diff --git a/gfx/drivers/d3d11.c b/gfx/drivers/d3d11.c index 6fbf8fe1d4..079396edce 100644 --- a/gfx/drivers/d3d11.c +++ b/gfx/drivers/d3d11.c @@ -14,19 +14,20 @@ */ #include -#include -#include "driver.h" -#include "verbosity.h" -#include "configuration.h" -#include "gfx/video_driver.h" -#include "gfx/common/win32_common.h" -#include "gfx/common/d3d11_common.h" -#include "gfx/common/dxgi_common.h" -#include "gfx/common/d3dcompiler_common.h" -#include "performance_counters.h" +#include #include +#include "../../driver.h" +#include "../../verbosity.h" +#include "../configuration.h" +#include "../video_driver.h" +#include "../common/win32_common.h" +#include "../common/d3d11_common.h" +#include "../common/dxgi_common.h" +#include "../common/d3dcompiler_common.h" +#include "../../performance_counters.h" + static void* d3d11_gfx_init(const video_info_t* video, const input_driver_t** input, void** input_data) { diff --git a/input/drivers_joypad/xinput_joypad.c b/input/drivers_joypad/xinput_joypad.c index b7514cf9ac..97528e18ff 100644 --- a/input/drivers_joypad/xinput_joypad.c +++ b/input/drivers_joypad/xinput_joypad.c @@ -107,8 +107,10 @@ typedef struct extern int g_xinput_pad_indexes[MAX_USERS]; extern bool g_xinput_block_pads; +#ifdef HAVE_DYNAMIC /* For xinput1_n.dll */ static dylib_t g_xinput_dll; +#endif /* Function pointer, to be assigned with dylib_proc */ typedef uint32_t (__stdcall *XInputGetStateEx_t)(uint32_t, XINPUT_STATE*); @@ -178,7 +180,7 @@ static bool xinput_joypad_init(void *data) const char *version = "1.4"; (void)data; - +#ifdef HAVE_DYNAMIC g_xinput_dll = NULL; /* Find the correct path to load the DLL from. @@ -210,6 +212,9 @@ static bool xinput_joypad_init(void *data) * First try to load ordinal 100 (XInputGetStateEx). */ g_XInputGetStateEx = (XInputGetStateEx_t)dylib_proc(g_xinput_dll, (const char*)100); +#else + g_XInputGetStateEx = (XInputGetStateEx_t)XInputGetStateEx; +#endif g_xinput_guide_button_supported = true; if (!g_XInputGetStateEx) @@ -218,22 +223,34 @@ static bool xinput_joypad_init(void *data) * XInputGetState, at the cost of losing guide button support. */ g_xinput_guide_button_supported = false; +#ifdef HAVE_DYNAMIC g_XInputGetStateEx = (XInputGetStateEx_t)dylib_proc(g_xinput_dll, "XInputGetState"); +#else + g_XInputGetStateEx = (XInputGetStateEx_t)XInputGetState; +#endif if (!g_XInputGetStateEx) { RARCH_ERR("[XInput]: Failed to init: DLL is invalid or corrupt.\n"); +#ifdef HAVE_DYNAMIC dylib_close(g_xinput_dll); +#endif return false; /* DLL was loaded but did not contain the correct function. */ } RARCH_WARN("[XInput]: No guide button support.\n"); } +#ifdef HAVE_DYNAMIC g_XInputSetState = (XInputSetState_t)dylib_proc(g_xinput_dll, "XInputSetState"); +#else + g_XInputSetState = (XInputSetState_t)XInputSetState; +#endif if (!g_XInputSetState) { RARCH_ERR("[XInput]: Failed to init: DLL is invalid or corrupt.\n"); +#ifdef HAVE_DYNAMIC dylib_close(g_xinput_dll); +#endif return false; /* DLL was loaded but did not contain the correct function. */ } @@ -323,9 +340,11 @@ static void xinput_joypad_destroy(void) for (i = 0; i < 4; ++i) memset(&g_xinput_states[i], 0, sizeof(xinput_joypad_state)); +#ifdef HAVE_DYNAMIC dylib_close(g_xinput_dll); g_xinput_dll = NULL; +#endif g_XInputGetStateEx = NULL; g_XInputSetState = NULL; diff --git a/pkg/msvc/RetroArch-msvc2013.sln b/pkg/msvc/RetroArch-msvc2013.sln new file mode 100644 index 0000000000..2679089076 --- /dev/null +++ b/pkg/msvc/RetroArch-msvc2013.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.21005.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RetroArch-msvc2013", "msvc-2013/RetroArch-msvc2013.vcxproj", "{C95DA947-1EAF-4D60-A06A-61EF1E8B8A95}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C95DA947-1EAF-4D60-A06A-61EF1E8B8A95}.Debug|Win32.ActiveCfg = Debug|Win32 + {C95DA947-1EAF-4D60-A06A-61EF1E8B8A95}.Debug|Win32.Build.0 = Debug|Win32 + {C95DA947-1EAF-4D60-A06A-61EF1E8B8A95}.Debug|x64.ActiveCfg = Debug|x64 + {C95DA947-1EAF-4D60-A06A-61EF1E8B8A95}.Debug|x64.Build.0 = Debug|x64 + {C95DA947-1EAF-4D60-A06A-61EF1E8B8A95}.Release|Win32.ActiveCfg = Release|Win32 + {C95DA947-1EAF-4D60-A06A-61EF1E8B8A95}.Release|Win32.Build.0 = Release|Win32 + {C95DA947-1EAF-4D60-A06A-61EF1E8B8A95}.Release|x64.ActiveCfg = Release|x64 + {C95DA947-1EAF-4D60-A06A-61EF1E8B8A95}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/pkg/msvc/msvc-2013/RetroArch-msvc2013.vcxproj b/pkg/msvc/msvc-2013/RetroArch-msvc2013.vcxproj new file mode 100644 index 0000000000..5390f68b57 --- /dev/null +++ b/pkg/msvc/msvc-2013/RetroArch-msvc2013.vcxproj @@ -0,0 +1,161 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {C95DA947-1EAF-4D60-A06A-61EF1E8B8A95} + Win32Proj + RetroArchmsvc2013 + + + + Application + true + v120 + Unicode + + + Application + true + v120 + Unicode + + + Application + false + v120 + true + Unicode + + + Application + false + v120 + true + Unicode + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + + + + 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) + + + Windows + true + + + + + + + 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) + + + Windows + true + + + + + Level3 + + + MaxSpeed + 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) + + + Windows + true + true + true + + + + + Level3 + + + MaxSpeed + 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) + + + Windows + true + true + true + + + + + CompileAsC + 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) + + + + + + + diff --git a/pkg/msvc/msvc-2013/RetroArch-msvc2013.vcxproj.filters b/pkg/msvc/msvc-2013/RetroArch-msvc2013.vcxproj.filters new file mode 100644 index 0000000000..f7cb6c4498 --- /dev/null +++ b/pkg/msvc/msvc-2013/RetroArch-msvc2013.vcxproj.filters @@ -0,0 +1,25 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + \ No newline at end of file