Remove Win32 types from UI substitution textures

This commit is contained in:
notmatthewbeshay 2026-03-10 21:30:58 +11:00
parent e83cf9a2f3
commit ca72052b4c
4 changed files with 9 additions and 5 deletions

View file

@ -1383,7 +1383,7 @@ void RADLINK UIController::TextureSubstitutionDestroyCallback ( void * user_call
t->releaseTexture( id );
}
void UIController::registerSubstitutionTexture(const std::wstring &textureName, PBYTE pbData, DWORD dwLength)
void UIController::registerSubstitutionTexture(const std::wstring &textureName, std::uint8_t *pbData, unsigned int dwLength)
{
// Remove it if it already exists
unregisterSubstitutionTexture(textureName,false);

View file

@ -1,5 +1,7 @@
#pragma once
//using namespace std;
#include <cstdint>
#include "IUIController.h"
#include "UIEnums.h"
#include "UIGroup.h"
@ -256,7 +258,7 @@ protected:
virtual void destroySubstitutionTexture(void *destroyCallBackData, GDrawTexture *handle) {}
public:
void registerSubstitutionTexture(const std::wstring &textureName, PBYTE pbData, DWORD dwLength);
void registerSubstitutionTexture(const std::wstring &textureName, std::uint8_t *pbData, unsigned int dwLength);
void unregisterSubstitutionTexture(const std::wstring &textureName, bool deleteData);
public:

View file

@ -1161,7 +1161,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16 * call)
}
}
void UIScene::registerSubstitutionTexture(const std::wstring &textureName, PBYTE pbData, DWORD dwLength, bool deleteData)
void UIScene::registerSubstitutionTexture(const std::wstring &textureName, std::uint8_t *pbData, unsigned int dwLength, bool deleteData)
{
m_registeredTextures[textureName] = deleteData;;
ui.registerSubstitutionTexture(textureName, pbData, dwLength);
@ -1245,4 +1245,4 @@ size_t UIScene::GetCallbackUniqueId()
bool UIScene::isReadyToDelete()
{
return true;
}
}

View file

@ -4,6 +4,8 @@
//using namespace std;
// A scene map directly to an Iggy movie (or more accurately a collection of different sized movies)
#include <cstdint>
#include "UIEnums.h"
#include "UIControl_Base.h"
@ -251,7 +253,7 @@ public:
#ifdef _XBOX_ONE
virtual void HandleDLCLicenseChange() {}
#endif
void registerSubstitutionTexture(const std::wstring &textureName, PBYTE pbData, DWORD dwLength, bool deleteData = false);
void registerSubstitutionTexture(const std::wstring &textureName, std::uint8_t *pbData, unsigned int dwLength, bool deleteData = false);
bool hasRegisteredSubstitutionTexture(const std::wstring &textureName);
virtual void handleUnlockFullVersion() {}