HideCursor Config

Option inside the config to hide/show cursor during SDL3
This commit is contained in:
Naomino 2024-07-07 20:04:37 +02:00
parent 1435962bed
commit 073e51e729
3 changed files with 7 additions and 1 deletions

View file

@ -11,6 +11,7 @@ namespace Config {
static bool isNeo = false;
static bool isFullscreen = false;
static bool hideCursor = true;
static u32 screenWidth = 1280;
static u32 screenHeight = 720;
static s32 gpuId = -1; // Vulkan physical device index. Set to negative for auto select
@ -54,6 +55,10 @@ bool isFullscreenMode() {
return isFullscreen;
}
bool isHideCursor() {
return hideCursor;
}
u32 getScreenWidth() {
return screenWidth;
}

View file

@ -13,6 +13,7 @@ void save(const std::filesystem::path& path);
bool isNeoMode();
bool isFullscreenMode();
bool isHideCursor();
std::string getLogFilter();
std::string getLogType();

View file

@ -45,7 +45,7 @@ WindowSDL::WindowSDL(s32 width_, s32 height_, Input::GameController* controller_
}
SDL_SetWindowFullscreen(window, Config::isFullscreenMode());
CursorVisibility(true);
CursorVisibility(Config::isHideCursor());
#if defined(SDL_PLATFORM_WIN32)
window_info.type = WindowSystemType::Windows;