mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-31 12:31:45 +01:00
Compilation fix (mingw)
This commit is contained in:
parent
3baf79f929
commit
19a698682b
@ -61,7 +61,7 @@ namespace utils
|
||||
void* get_proc_address(const char* lib, const char* name)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
return GetProcAddress(GetModuleHandleA(lib), name);
|
||||
return reinterpret_cast<void*>(GetProcAddress(GetModuleHandleA(lib), name));
|
||||
#else
|
||||
return dlsym(dlopen(lib, RTLD_NOLOAD), name);
|
||||
#endif
|
||||
|
@ -31,6 +31,7 @@
|
||||
#define SAFE_BUFFERS
|
||||
#define NEVER_INLINE __attribute__((noinline))
|
||||
#define FORCE_INLINE __attribute__((always_inline)) inline
|
||||
#define thread_local __thread
|
||||
#endif
|
||||
|
||||
#define CHECK_SIZE(type, size) static_assert(sizeof(type) == size, "Invalid " #type " type size")
|
||||
|
@ -209,7 +209,7 @@ if(MSVC)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS /DYNAMICBASE:NO /BASE:0x10000 /FIXED")
|
||||
endif()
|
||||
if(WIN32)
|
||||
target_link_libraries(rpcs3 ws2_32.lib Winmm.lib VKstatic.1 glslang OSDependent OGLCompiler SPIRV HLSL)
|
||||
target_link_libraries(rpcs3 ws2_32.lib Winmm.lib Psapi.lib VKstatic.1 glslang OSDependent OGLCompiler SPIRV HLSL)
|
||||
if(NOT MSVC)
|
||||
target_link_libraries(rpcs3 ${OPENGL_LIBRARIES} ${GLEW_LIBRARY} opengl32.lib glu32.lib libpthread)
|
||||
else()
|
||||
|
@ -18,11 +18,12 @@ void gl::init()
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
extern "C" {
|
||||
extern "C"
|
||||
{
|
||||
// NVIDIA Optimus: Default dGPU instead of iGPU (Driver: 302+)
|
||||
_declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
|
||||
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
|
||||
// AMD: Request dGPU High Performance (Driver: 13.35+)
|
||||
_declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
|
||||
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
|
||||
}
|
||||
|
||||
#define OPENGL_PROC(p, n) p gl##n = nullptr
|
||||
|
@ -328,10 +328,14 @@ namespace vk
|
||||
s++;
|
||||
}
|
||||
|
||||
VkViewport vp = {0, 0, target_w, target_h, 0., 1.};
|
||||
VkViewport vp{};
|
||||
vp.width = target_w;
|
||||
vp.height = target_h;
|
||||
vp.minDepth = 0.f;
|
||||
vp.maxDepth = 1.f;
|
||||
vkCmdSetViewport(cmd, 0, 1, &vp);
|
||||
|
||||
VkRect2D vs = { {0, 0}, {target_w, target_h} };
|
||||
VkRect2D vs = { {0, 0}, {0u+target_w, 0u+target_h} };
|
||||
vkCmdSetScissor(cmd, 0, 1, &vs);
|
||||
|
||||
//TODO: Add drop shadow if deemed necessary for visibility
|
||||
|
Loading…
x
Reference in New Issue
Block a user