diff --git a/frontend/drivers/platform_win32.c b/frontend/drivers/platform_win32.c
index 31b238c814..b754a7bc8c 100644
--- a/frontend/drivers/platform_win32.c
+++ b/frontend/drivers/platform_win32.c
@@ -47,8 +47,10 @@
* it early seems to cause issues on some systems.
*/
+#ifdef HAVE_DYNAMIC
static dylib_t dwmlib;
static dylib_t shell32lib;
+#endif
VOID (WINAPI *DragAcceptFiles_func)(HWND, BOOL);
@@ -58,12 +60,14 @@ static bool console_needs_free;
static void gfx_dwm_shutdown(void)
{
+#ifdef HAVE_DYNAMIC
if (dwmlib)
dylib_close(dwmlib);
if (shell32lib)
dylib_close(shell32lib);
dwmlib = NULL;
shell32lib = NULL;
+#endif
}
static bool gfx_init_dwm(void)
@@ -76,6 +80,7 @@ static bool gfx_init_dwm(void)
atexit(gfx_dwm_shutdown);
+#ifdef HAVE_DYNAMIC
shell32lib = dylib_load("shell32.dll");
if (!shell32lib)
{
@@ -91,13 +96,20 @@ static bool gfx_init_dwm(void)
DragAcceptFiles_func =
(VOID (WINAPI*)(HWND, BOOL))dylib_proc(shell32lib, "DragAcceptFiles");
-
+
mmcss =
- (HRESULT (WINAPI*)(BOOL))dylib_proc(dwmlib, "DwmEnableMMCSS");
+ (HRESULT(WINAPI*)(BOOL))dylib_proc(dwmlib, "DwmEnableMMCSS");
+#else
+ DragAcceptFiles_func = DragAcceptFiles;
+#if 0
+ mmcss = DwmEnableMMCSS;
+#endif
+#endif
+
if (mmcss)
{
- RARCH_LOG("Setting multimedia scheduling for DWM.\n");
- mmcss(TRUE);
+ RARCH_LOG("Setting multimedia scheduling for DWM.\n");
+ mmcss(TRUE);
}
inited = true;
@@ -116,8 +128,11 @@ static void gfx_set_dwm(void)
if (settings->bools.video_disable_composition == dwm_composition_disabled)
return;
+#ifdef HAVE_DYNAMIC
composition_enable =
(HRESULT (WINAPI*)(UINT))dylib_proc(dwmlib, "DwmEnableComposition");
+#endif
+
if (!composition_enable)
{
RARCH_ERR("Did not find DwmEnableComposition ...\n");
@@ -292,22 +307,22 @@ static void frontend_win32_init(void *data)
{
typedef BOOL (WINAPI *isProcessDPIAwareProc)();
typedef BOOL (WINAPI *setProcessDPIAwareProc)();
+#ifdef HAVE_DYNAMIC
HMODULE handle =
GetModuleHandle("User32.dll");
isProcessDPIAwareProc isDPIAwareProc =
(isProcessDPIAwareProc)dylib_proc(handle, "IsProcessDPIAware");
setProcessDPIAwareProc setDPIAwareProc =
(setProcessDPIAwareProc)dylib_proc(handle, "SetProcessDPIAware");
+#else
+ isProcessDPIAwareProc isDPIAwareProc = IsProcessDPIAware;
+ setProcessDPIAwareProc setDPIAwareProc = SetProcessDPIAware;
+#endif
if (isDPIAwareProc)
- {
if (!isDPIAwareProc())
- {
if (setDPIAwareProc)
setDPIAwareProc();
- }
- }
-
}
enum frontend_powerstate frontend_win32_get_powerstate(int *seconds, int *percent)
diff --git a/pkg/msvc/msvc-2013/RetroArch-msvc2013.vcxproj b/pkg/msvc/msvc-2013/RetroArch-msvc2013.vcxproj
index 5390f68b57..417acd2fe2 100644
--- a/pkg/msvc/msvc-2013/RetroArch-msvc2013.vcxproj
+++ b/pkg/msvc/msvc-2013/RetroArch-msvc2013.vcxproj
@@ -85,7 +85,7 @@
Level3
Disabled
WIN32;HAVE_MENU;HAVE_XMB;HAVE_RGUI;HAVE_MATERIALUI;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
- $(SolutionDir)\..\..\gfx\include\dxsdk;$(SolutionDir)\..\..\gfx\include;$(SolutionDir)\..\..\libretro-common\include;%(AdditionalIncludeDirectories)
+ $(SolutionDir)\..\..\gfx\include\dxsdk;$(SolutionDir)\..\..\gfx\include;$(SolutionDir)\..\..\libretro-common\include;$(SolutionDir)\..\..\deps;%(AdditionalIncludeDirectories)
Windows
@@ -99,7 +99,7 @@
Level3
Disabled
WIN32;HAVE_MENU;HAVE_XMB;HAVE_RGUI;HAVE_MATERIALUI;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
- $(SolutionDir)\..\..\gfx\include\dxsdk;$(SolutionDir)\..\..\gfx\include;$(SolutionDir)\..\..\libretro-common\include;%(AdditionalIncludeDirectories)
+ $(SolutionDir)\..\..\gfx\include\dxsdk;$(SolutionDir)\..\..\gfx\include;$(SolutionDir)\..\..\libretro-common\include;$(SolutionDir)\..\..\deps;%(AdditionalIncludeDirectories)
Windows
@@ -115,7 +115,7 @@
true
true
WIN32;HAVE_MENU;HAVE_XMB;HAVE_RGUI;HAVE_MATERIALUI;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
- $(SolutionDir)\..\..\gfx\include\dxsdk;$(SolutionDir)\..\..\gfx\include;$(SolutionDir)\..\..\libretro-common\include;%(AdditionalIncludeDirectories)
+ $(SolutionDir)\..\..\gfx\include\dxsdk;$(SolutionDir)\..\..\gfx\include;$(SolutionDir)\..\..\libretro-common\include;$(SolutionDir)\..\..\deps;%(AdditionalIncludeDirectories)
Windows
@@ -133,7 +133,7 @@
true
true
WIN32;HAVE_MENU;HAVE_XMB;HAVE_RGUI;HAVE_MATERIALUI;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
- $(SolutionDir)\..\..\gfx\include\dxsdk;$(SolutionDir)\..\..\gfx\include;$(SolutionDir)\..\..\libretro-common\include;%(AdditionalIncludeDirectories)
+ $(SolutionDir)\..\..\gfx\include\dxsdk;$(SolutionDir)\..\..\gfx\include;$(SolutionDir)\..\..\libretro-common\include;$(SolutionDir)\..\..\deps;%(AdditionalIncludeDirectories)
Windows
@@ -148,14 +148,14 @@
CompileAsC
CompileAsC
CompileAsC
- HAVE_XAUDIO;HAVE_XINPUT;HAVE_D3D;HAVE_D3D9;%(PreprocessorDefinitions)
- HAVE_XAUDIO;HAVE_XINPUT;HAVE_D3D;HAVE_D3D9;%(PreprocessorDefinitions)
- HAVE_XAUDIO;HAVE_XINPUT;HAVE_D3D;HAVE_D3D9;%(PreprocessorDefinitions)
- HAVE_XAUDIO;HAVE_XINPUT;HAVE_D3D;HAVE_D3D9;%(PreprocessorDefinitions)
+ HAVE_XAUDIO;HAVE_DINPUT;HAVE_D3D;HAVE_D3D9;%(PreprocessorDefinitions)
+ HAVE_XAUDIO;HAVE_DINPUT;HAVE_D3D;HAVE_D3D9;%(PreprocessorDefinitions)
+ HAVE_XAUDIO;HAVE_DINPUT;HAVE_D3D;HAVE_D3D9;%(PreprocessorDefinitions)
+ HAVE_XAUDIO;HAVE_DINPUT;HAVE_D3D;HAVE_D3D9;%(PreprocessorDefinitions)
-
+
\ No newline at end of file