summaryrefslogtreecommitdiffstats
path: root/src/citra
diff options
context:
space:
mode:
authorKevin Hartman <kevin@hart.mn>2014-08-30 07:23:12 +0200
committerTony Wasserka <NeoBrainX@gmail.com>2014-11-18 13:06:05 +0100
commit221a9b023d8c9ca55c093823e9efd6d13d0a54a2 (patch)
tree57a26a0e11416b366688d00c4a2c9216fa0cde78 /src/citra
parentAdd a GUI logging channel. (diff)
downloadyuzu-221a9b023d8c9ca55c093823e9efd6d13d0a54a2.tar
yuzu-221a9b023d8c9ca55c093823e9efd6d13d0a54a2.tar.gz
yuzu-221a9b023d8c9ca55c093823e9efd6d13d0a54a2.tar.bz2
yuzu-221a9b023d8c9ca55c093823e9efd6d13d0a54a2.tar.lz
yuzu-221a9b023d8c9ca55c093823e9efd6d13d0a54a2.tar.xz
yuzu-221a9b023d8c9ca55c093823e9efd6d13d0a54a2.tar.zst
yuzu-221a9b023d8c9ca55c093823e9efd6d13d0a54a2.zip
Diffstat (limited to 'src/citra')
-rw-r--r--src/citra/emu_window/emu_window_glfw.cpp5
-rw-r--r--src/citra/emu_window/emu_window_glfw.h5
2 files changed, 9 insertions, 1 deletions
diff --git a/src/citra/emu_window/emu_window_glfw.cpp b/src/citra/emu_window/emu_window_glfw.cpp
index 0c774bbc5..d0f6e9a9e 100644
--- a/src/citra/emu_window/emu_window_glfw.cpp
+++ b/src/citra/emu_window/emu_window_glfw.cpp
@@ -34,6 +34,10 @@ const bool EmuWindow_GLFW::IsOpen() {
return glfwWindowShouldClose(m_render_window) == 0;
}
+void EmuWindow_GLFW::GetFramebufferSize(int* fbWidth, int* fbHeight) {
+ glfwGetFramebufferSize(m_render_window, fbWidth, fbHeight);
+}
+
/// EmuWindow_GLFW constructor
EmuWindow_GLFW::EmuWindow_GLFW() {
keyboard_id = KeyMap::NewDeviceId();
@@ -64,6 +68,7 @@ EmuWindow_GLFW::EmuWindow_GLFW() {
glfwSetWindowUserPointer(m_render_window, this);
glfwSetKeyCallback(m_render_window, OnKeyEvent);
+
DoneCurrent();
}
diff --git a/src/citra/emu_window/emu_window_glfw.h b/src/citra/emu_window/emu_window_glfw.h
index 7c3072145..e96228765 100644
--- a/src/citra/emu_window/emu_window_glfw.h
+++ b/src/citra/emu_window/emu_window_glfw.h
@@ -21,7 +21,7 @@ public:
/// Makes the graphics context current for the caller thread
void MakeCurrent() override;
-
+
/// Releases (dunno if this is the "right" word) the GLFW context from the caller thread
void DoneCurrent() override;
@@ -32,6 +32,9 @@ public:
void ReloadSetKeymaps() override;
+ /// Gets the size of the window in pixels
+ void GetFramebufferSize(int* fbWidth, int* fbHeight);
+
private:
GLFWwindow* m_render_window; ///< Internal GLFW render window