aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/citra/emu_window/emu_window_glfw.cpp
diff options
context:
space:
mode:
authorGravatar archshift <admin@archshift.com>2014-10-15 18:48:02 -0700
committerGravatar archshift <admin@archshift.com>2014-10-17 14:56:17 -0700
commitccb59a9d2891421fc81bdaaed39df79c61364a86 (patch)
treea87a5ae1344688c6d90fd23784b6c975405d6727 /src/citra/emu_window/emu_window_glfw.cpp
parente4905143c8bc1ea8a2c736e025db234fdd82aea8 (diff)
Implemented graceful closing of the GLFW window, along with emulation.
Diffstat (limited to 'src/citra/emu_window/emu_window_glfw.cpp')
-rw-r--r--src/citra/emu_window/emu_window_glfw.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/citra/emu_window/emu_window_glfw.cpp b/src/citra/emu_window/emu_window_glfw.cpp
index 6cdba2b8..079c5356 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();