summaryrefslogtreecommitdiffstats
path: root/src/citra/emu_window
diff options
context:
space:
mode:
authorarchshift <admin@archshift.com>2014-10-16 03:48:02 +0200
committerarchshift <admin@archshift.com>2014-10-17 23:56:17 +0200
commitccb59a9d2891421fc81bdaaed39df79c61364a86 (patch)
treea87a5ae1344688c6d90fd23784b6c975405d6727 /src/citra/emu_window
parentMerge pull request #113 from neobrain/opengl_refactor (diff)
downloadyuzu-ccb59a9d2891421fc81bdaaed39df79c61364a86.tar
yuzu-ccb59a9d2891421fc81bdaaed39df79c61364a86.tar.gz
yuzu-ccb59a9d2891421fc81bdaaed39df79c61364a86.tar.bz2
yuzu-ccb59a9d2891421fc81bdaaed39df79c61364a86.tar.lz
yuzu-ccb59a9d2891421fc81bdaaed39df79c61364a86.tar.xz
yuzu-ccb59a9d2891421fc81bdaaed39df79c61364a86.tar.zst
yuzu-ccb59a9d2891421fc81bdaaed39df79c61364a86.zip
Diffstat (limited to 'src/citra/emu_window')
-rw-r--r--src/citra/emu_window/emu_window_glfw.cpp5
-rw-r--r--src/citra/emu_window/emu_window_glfw.h3
2 files changed, 8 insertions, 0 deletions
diff --git a/src/citra/emu_window/emu_window_glfw.cpp b/src/citra/emu_window/emu_window_glfw.cpp
index 6cdba2b87..079c5356d 100644
--- a/src/citra/emu_window/emu_window_glfw.cpp
+++ b/src/citra/emu_window/emu_window_glfw.cpp
@@ -29,6 +29,11 @@ void EmuWindow_GLFW::OnKeyEvent(GLFWwindow* win, int key, int scancode, int acti
HID_User::PadUpdateComplete();
}
+/// Whether the window is still open, and a close request hasn't yet been sent
+const bool EmuWindow_GLFW::IsOpen() {
+ return glfwWindowShouldClose(m_render_window) != 0;
+}
+
/// EmuWindow_GLFW constructor
EmuWindow_GLFW::EmuWindow_GLFW() {
keyboard_id = KeyMap::NewDeviceId();
diff --git a/src/citra/emu_window/emu_window_glfw.h b/src/citra/emu_window/emu_window_glfw.h
index d38a11c2c..638e026ef 100644
--- a/src/citra/emu_window/emu_window_glfw.h
+++ b/src/citra/emu_window/emu_window_glfw.h
@@ -27,6 +27,9 @@ public:
static void OnKeyEvent(GLFWwindow* win, int key, int scancode, int action, int mods);
+ /// Whether the window is still open, and a close request hasn't yet been sent
+ const bool IsOpen();
+
void ReloadSetKeymaps() override;
private: