diff options
author | Kevin Hartman <kevin@hart.mn> | 2014-08-29 22:23:12 -0700 |
---|---|---|
committer | Tony Wasserka <NeoBrainX@gmail.com> | 2014-11-18 13:06:05 +0100 |
commit | 221a9b023d8c9ca55c093823e9efd6d13d0a54a2 (patch) | |
tree | 57a26a0e11416b366688d00c4a2c9216fa0cde78 /src/citra/emu_window/emu_window_glfw.cpp | |
parent | c8d933a14211ce6ee02659ecef758a1f303bc87f (diff) |
Viewport scaling and display density independence
The view is scaled to be as large as possible, without changing the aspect, within the bounds of the window.
On "retina" displays, or other displays where window units != pixels, the view should no longer draw incorrectly.
Diffstat (limited to 'src/citra/emu_window/emu_window_glfw.cpp')
-rw-r--r-- | src/citra/emu_window/emu_window_glfw.cpp | 5 |
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 0c774bbc..d0f6e9a9 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(); } |