1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 03:28:20 +02:00

SDL platform improvements

This commit is contained in:
Brian Fiete 2022-11-10 06:37:55 -08:00
parent d20b53b187
commit 8e191b074b
101 changed files with 37801 additions and 68 deletions

View file

@ -13,6 +13,10 @@
#include "util/AllocDebug.h"
#ifdef BF_PLATFORM_WINDOWS
#include "platform/sdl/SdlBFApp.h"
#endif
//#include "third_party/freetype/include/ft2build.h"
//#include FT_FREETYPE_H
//#include "img/PNGData.h"
@ -84,8 +88,26 @@ BF_EXPORT void BF_CALLTYPE BFApp_GetWorkspaceRectFrom(int fromX, int fromY, int
gBFApp->GetWorkspaceRectFrom(fromX, fromY, fromWidth, fromHeight, outX, outY, outWidth, outHeight);
}
static bool gForceSDL = false;
BF_EXPORT void BF_CALLTYPE BFApp_SetOptionString(const char* name, const char* value)
{
if (strcmp(name, "SDL") == 0)
{
gForceSDL = strcmp(value, "1") == 0;
}
}
BF_EXPORT void BF_CALLTYPE BFApp_Create()
{
#ifdef BF_PLATFORM_WINDOWS
if (gForceSDL)
{
new SdlBFApp();
return;
}
#endif
new PlatformBFApp();
}