From affda37d043d61d4ad3fd8b604c6504ecacf0d30 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Tue, 6 Jun 2017 18:54:18 +0200 Subject: [PATCH] fix dpi scaling (for all ?) --- rpcs3/main.cpp | 4 +++- rpcs3/rpcs3qt/gs_frame.cpp | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/rpcs3/main.cpp b/rpcs3/main.cpp index 65f31f329e..c7874a975f 100644 --- a/rpcs3/main.cpp +++ b/rpcs3/main.cpp @@ -8,8 +8,10 @@ int main(int argc, char** argv) { -#ifdef Q_OS_WIN +#ifdef _WIN32 SetProcessDPIAware(); +#else + qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "1"); #endif rpcs3_app app(argc, argv); diff --git a/rpcs3/rpcs3qt/gs_frame.cpp b/rpcs3/rpcs3qt/gs_frame.cpp index afd1de3ccc..cc04f31d17 100644 --- a/rpcs3/rpcs3qt/gs_frame.cpp +++ b/rpcs3/rpcs3qt/gs_frame.cpp @@ -136,12 +136,20 @@ void gs_frame::delete_context(void* ctx) int gs_frame::client_width() { +#ifdef _WIN32 return size().width(); +#else + return size().width() * devicePixelRatio(); +#endif } int gs_frame::client_height() { +#ifdef _WIN32 return size().height(); +#else + return size().height() * devicePixelRatio(); +#endif } void gs_frame::flip(draw_context_t)