This commit is contained in:
Isuru Samarathunga
2025-10-21 23:24:14 +05:30
parent 2d5875d211
commit e40b1f120b
3 changed files with 14 additions and 2 deletions

View File

@ -32,7 +32,7 @@ namespace ia::iae
if (FT_Init_FreeType(&g_freetype)) if (FT_Init_FreeType(&g_freetype))
THROW_UNKNOWN("Failed to initialize the FreeType font library"); THROW_UNKNOWN("Failed to initialize the FreeType font library");
LoadFont("Roboto", "Resources/Fonts/Roboto-Black.ttf"); //LoadFont("Roboto", "Resources/Fonts/Roboto-Black.ttf");
} }
VOID FontManager::Terminate() VOID FontManager::Terminate()

View File

@ -74,7 +74,8 @@ namespace ia::iae
case SDL_EVENT_FINGER_MOTION: case SDL_EVENT_FINGER_MOTION:
case SDL_EVENT_MOUSE_MOTION: case SDL_EVENT_MOUSE_MOTION:
s_pointerPosition = {event->motion.x, event->motion.y}; if((event->motion.x >= 1) && (event->motion.y >= 1))
s_pointerPosition = {event->motion.x, event->motion.y};
break; break;
case SDL_EVENT_MOUSE_BUTTON_DOWN: case SDL_EVENT_MOUSE_BUTTON_DOWN:
@ -236,6 +237,10 @@ namespace ia::iae
STATIC CONSTEXPR INT16 DIRECTION_MAP_VERTICAL[] = {0, 1, 1, 1, 0, -1, -1, -1}; STATIC CONSTEXPR INT16 DIRECTION_MAP_VERTICAL[] = {0, 1, 1, 1, 0, -1, -1, -1};
STATIC CONSTEXPR INT16 DIRECTION_MAP_HORIZONTAL[] = {1, 1, 0, -1, -1, -1, 0, 1}; STATIC CONSTEXPR INT16 DIRECTION_MAP_HORIZONTAL[] = {1, 1, 0, -1, -1, -1, 0, 1};
const auto ps = g_onScreenGamepadState;
g_onScreenGamepadState.ThumbstickPosition *= Engine::GetSceneScalingFactor();
g_onScreenGamepadState.ThumbstickRadius *= Engine::GetSceneScalingFactor().x;
if (Engine::Input_IsPointerDown(g_onScreenGamepadState.ThumbstickPosition, if (Engine::Input_IsPointerDown(g_onScreenGamepadState.ThumbstickPosition,
g_onScreenGamepadState.ThumbstickRadius)) g_onScreenGamepadState.ThumbstickRadius))
g_onScreenGamepadState.KnobPosition = g_onScreenGamepadState.KnobPosition =
@ -257,6 +262,9 @@ namespace ia::iae
s_verticalAxis = DIRECTION_MAP_VERTICAL[t]; s_verticalAxis = DIRECTION_MAP_VERTICAL[t];
s_horizontalAxis = DIRECTION_MAP_HORIZONTAL[t]; s_horizontalAxis = DIRECTION_MAP_HORIZONTAL[t];
} }
g_onScreenGamepadState.ThumbstickPosition = ps.ThumbstickPosition;
g_onScreenGamepadState.ThumbstickRadius = ps.ThumbstickRadius;
} }
if (s_keyboardGamePadEnabled) if (s_keyboardGamePadEnabled)

View File

@ -65,6 +65,10 @@ namespace ia::iae
// SDL_SetWindowResizable(g_windowHandle, false); // SDL_SetWindowResizable(g_windowHandle, false);
#if __ANDROID__
SDL_SetWindowFullscreen(g_windowHandle, true);
#endif
const auto gameVersion = g_gameVersion; const auto gameVersion = g_gameVersion;
SDL_SetAppMetadata(g_gameName.c_str(), IA_STRINGIFY_VERSION(gameVersion).c_str(), g_gamePackageName.c_str()); SDL_SetAppMetadata(g_gameName.c_str(), IA_STRINGIFY_VERSION(gameVersion).c_str(), g_gamePackageName.c_str());