SDL: Support high-dpi displays

This commit is contained in:
Connor McLaughlin
2020-02-28 16:59:48 +10:00
parent a0a0cd48fa
commit ce31c85983
9 changed files with 148 additions and 48 deletions

View File

@ -78,11 +78,14 @@ private:
bool UseOpenGLRenderer() const { return true; }
#endif
static float GetDPIScaleFactor(SDL_Window* window);
bool CreateSDLWindow();
void DestroySDLWindow();
bool CreateDisplay();
void DestroyDisplay();
void CreateImGuiContext();
void UpdateFramebufferScale();
/// Executes a callback later, after the UI has finished rendering. Needed to boot while rendering ImGui.
void RunLater(std::function<void()> callback);