Fixes
This commit is contained in:
@ -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()
|
||||||
|
|||||||
@ -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)
|
||||||
|
|||||||
@ -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());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user