Merge branch 'master' into jgrpp
# Conflicts: # src/os/windows/crashlog_win.cpp # src/os/windows/font_win32.cpp # src/os/windows/win32.cpp # src/os/windows/win32.h # src/video/win32_v.cpp # src/video/win32_v.h
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include "../window_gui.h"
|
||||
#include "../window_func.h"
|
||||
#include "../framerate_type.h"
|
||||
#include "../library_loader.h"
|
||||
#include "win32_v.h"
|
||||
#include <windows.h>
|
||||
#include <imm.h>
|
||||
@@ -987,10 +988,11 @@ float VideoDriver_Win32Base::GetDPIScale()
|
||||
static bool init_done = false;
|
||||
if (!init_done) {
|
||||
init_done = true;
|
||||
|
||||
_GetDpiForWindow = GetProcAddressT<PFNGETDPIFORWINDOW>(GetModuleHandle(L"User32"), "GetDpiForWindow");
|
||||
_GetDpiForSystem = GetProcAddressT<PFNGETDPIFORSYSTEM>(GetModuleHandle(L"User32"), "GetDpiForSystem");
|
||||
_GetDpiForMonitor = GetProcAddressT<PFNGETDPIFORMONITOR>(LoadLibrary(L"Shcore.dll"), "GetDpiForMonitor");
|
||||
static LibraryLoader _user32("user32.dll");
|
||||
static LibraryLoader _shcore("shcore.dll");
|
||||
_GetDpiForWindow = _user32.GetFunction("GetDpiForWindow");
|
||||
_GetDpiForSystem = _user32.GetFunction("GetDpiForSystem");
|
||||
_GetDpiForMonitor = _shcore.GetFunction("GetDpiForMonitor");
|
||||
}
|
||||
|
||||
UINT cur_dpi = 0;
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <mutex>
|
||||
#include <condition_variable>
|
||||
#include <vector>
|
||||
#include <windows.h>
|
||||
|
||||
/** Base class for Windows video drivers. */
|
||||
class VideoDriver_Win32Base : public VideoDriver {
|
||||
|
||||
Reference in New Issue
Block a user