summaryrefslogtreecommitdiffstats
path: root/src/yuzu_cmd
diff options
context:
space:
mode:
authorsan <san+gitkraken@smederijmerlijn.nl>2021-08-01 21:46:13 +0200
committersan <san+gitkraken@smederijmerlijn.nl>2021-08-01 21:46:13 +0200
commit3e2614148353342284b06899080e4707804eecf5 (patch)
tree2d34250d81a20709dbbf8dc4a57a8e4b827e7c8f /src/yuzu_cmd
parentgame_list: Make game list folder icons smaller (#6762) (diff)
downloadyuzu-3e2614148353342284b06899080e4707804eecf5.tar
yuzu-3e2614148353342284b06899080e4707804eecf5.tar.gz
yuzu-3e2614148353342284b06899080e4707804eecf5.tar.bz2
yuzu-3e2614148353342284b06899080e4707804eecf5.tar.lz
yuzu-3e2614148353342284b06899080e4707804eecf5.tar.xz
yuzu-3e2614148353342284b06899080e4707804eecf5.tar.zst
yuzu-3e2614148353342284b06899080e4707804eecf5.zip
Diffstat (limited to 'src/yuzu_cmd')
-rw-r--r--src/yuzu_cmd/emu_window/emu_window_sdl2.cpp4
-rw-r--r--src/yuzu_cmd/emu_window/emu_window_sdl2.h3
-rw-r--r--src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp1
-rw-r--r--src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp1
4 files changed, 9 insertions, 0 deletions
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
index f643a4b0b..c80f7791c 100644
--- a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
+++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
@@ -122,6 +122,10 @@ void EmuWindow_SDL2::OnResize() {
UpdateCurrentFramebufferLayout(width, height);
}
+void EmuWindow_SDL2::ShowCursor(bool show_cursor) {
+ SDL_ShowCursor(show_cursor ? SDL_ENABLE : SDL_DISABLE);
+}
+
void EmuWindow_SDL2::Fullscreen() {
switch (Settings::values.fullscreen_mode.GetValue()) {
case Settings::FullscreenMode::Exclusive:
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.h b/src/yuzu_cmd/emu_window/emu_window_sdl2.h
index aa0d52ae4..4810f8775 100644
--- a/src/yuzu_cmd/emu_window/emu_window_sdl2.h
+++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.h
@@ -67,6 +67,9 @@ protected:
/// Called by WaitEvent when any event that may cause the window to be resized occurs
void OnResize();
+ /// Called when users want to hide the mouse cursor
+ void ShowCursor(bool show_cursor);
+
/// Called when user passes the fullscreen parameter flag
void Fullscreen();
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp
index 5b98c255b..a075ad08a 100644
--- a/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp
+++ b/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp
@@ -111,6 +111,7 @@ EmuWindow_SDL2_GL::EmuWindow_SDL2_GL(InputCommon::InputSubsystem* input_subsyste
if (fullscreen) {
Fullscreen();
+ ShowCursor(false);
}
window_context = SDL_GL_CreateContext(render_window);
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp
index cdda375d8..de40b76bf 100644
--- a/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp
+++ b/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp
@@ -45,6 +45,7 @@ EmuWindow_SDL2_VK::EmuWindow_SDL2_VK(InputCommon::InputSubsystem* input_subsyste
if (fullscreen) {
Fullscreen();
+ ShowCursor(false);
}
switch (wm.subsystem) {