1
0
Fork 0
forked from suyu/suyu
suyu/src/citra/emu_window/emu_window_glfw.h
Kevin Hartman 221a9b023d 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.
2014-11-18 13:06:05 +01:00

43 lines
1.1 KiB
C++

// Copyright 2014 Citra Emulator Project
// Licensed under GPLv2
// Refer to the license.txt file included.
#pragma once
#include <GLFW/glfw3.h>
#include "common/emu_window.h"
class EmuWindow_GLFW : public EmuWindow {
public:
EmuWindow_GLFW();
~EmuWindow_GLFW();
/// Swap buffers to display the next frame
void SwapBuffers() override;
/// Polls window events
void PollEvents() override;
/// 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;
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;
/// Gets the size of the window in pixels
void GetFramebufferSize(int* fbWidth, int* fbHeight);
private:
GLFWwindow* m_render_window; ///< Internal GLFW render window
/// Device id of keyboard for use with KeyMap
int keyboard_id;
};