mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 14:24:10 +02:00
TLS return string
This commit is contained in:
parent
8f83d15429
commit
2345d5d349
1 changed files with 8 additions and 8 deletions
|
@ -23,8 +23,7 @@ USING_NS_BF;
|
||||||
|
|
||||||
#pragma warning(disable:4996)
|
#pragma warning(disable:4996)
|
||||||
|
|
||||||
static String gTempString;
|
static TLSingleton<String> gBeefySys_TLStrReturn;
|
||||||
static UTF16String gTempUTF16String;
|
|
||||||
int gPixelsDrawn = 0;
|
int gPixelsDrawn = 0;
|
||||||
|
|
||||||
#ifdef BF_PLATFORM_WINDOWS
|
#ifdef BF_PLATFORM_WINDOWS
|
||||||
|
@ -94,7 +93,6 @@ BF_EXPORT void BF_CALLTYPE BFApp_Delete()
|
||||||
{
|
{
|
||||||
delete gBFApp;
|
delete gBFApp;
|
||||||
gBFApp = NULL;
|
gBFApp = NULL;
|
||||||
gTempUTF16String.Dispose();
|
|
||||||
FTFontManager::ClearCache();
|
FTFontManager::ClearCache();
|
||||||
|
|
||||||
//OutputDebugStrF("Deleting App\n");
|
//OutputDebugStrF("Deleting App\n");
|
||||||
|
@ -263,8 +261,9 @@ BF_EXPORT void BF_CALLTYPE BFApp_RehupMouse()
|
||||||
|
|
||||||
BF_EXPORT const char* BF_CALLTYPE BFApp_EnumerateInputDevices()
|
BF_EXPORT const char* BF_CALLTYPE BFApp_EnumerateInputDevices()
|
||||||
{
|
{
|
||||||
gTempString = gBFApp->EnumerateInputDevices();
|
String& outString = *gBeefySys_TLStrReturn.Get();
|
||||||
return gTempString.c_str();
|
outString = gBFApp->EnumerateInputDevices();
|
||||||
|
return outString.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
BF_EXPORT BFInputDevice* BFApp_CreateInputDevice(const char* guid)
|
BF_EXPORT BFInputDevice* BFApp_CreateInputDevice(const char* guid)
|
||||||
|
@ -744,8 +743,9 @@ BF_EXPORT void BF_CALLTYPE BFInput_Destroy(BFInputDevice* inputDevice)
|
||||||
|
|
||||||
BF_EXPORT const char* BF_CALLTYPE BFInput_GetState(BFInputDevice* inputDevice)
|
BF_EXPORT const char* BF_CALLTYPE BFInput_GetState(BFInputDevice* inputDevice)
|
||||||
{
|
{
|
||||||
gTempString = inputDevice->GetState();
|
String& outString = *gBeefySys_TLStrReturn.Get();
|
||||||
return gTempString.c_str();
|
outString = inputDevice->GetState();
|
||||||
|
return outString.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
BF_EXPORT int BF_CALLTYPE BF_TickCount()
|
BF_EXPORT int BF_CALLTYPE BF_TickCount()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue