Fix compile on Windows.

This commit is contained in:
BearOso 2024-08-10 18:03:55 -05:00
parent 1773782575
commit 8559143576
7 changed files with 70 additions and 70 deletions

View File

@ -115,7 +115,7 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
list(APPEND LIBS libSDL2.a libz.a opengl32 gdi32 winmm imm32 ole32 oleaut32 version uuid advapi32 setupapi shell32 dinput8) list(APPEND LIBS libSDL2.a libz.a opengl32 gdi32 winmm imm32 ole32 oleaut32 version uuid advapi32 setupapi shell32 dinput8)
list(APPEND DEFINES SDL_MAIN_HANDLED) list(APPEND DEFINES SDL_MAIN_HANDLED)
list(APPEND PLATFORM_SOURCES list(APPEND PLATFORM_SOURCES
../common/video/wgl_context.cpp ../common/video/opengl/wgl_context.cpp
../external/glad/src/wgl.c ../external/glad/src/wgl.c
src/resources/snes9x_win32.rc) src/resources/snes9x_win32.rc)
else() else()

View File

@ -11,7 +11,7 @@
using namespace QNativeInterface; using namespace QNativeInterface;
#include <X11/Xlib.h> #include <X11/Xlib.h>
#else #else
#include "common/video/wgl_context.hpp" #include "common/video/opengl/wgl_context.hpp"
#endif #endif
#include "common/video/opengl/shaders/glsl.h" #include "common/video/opengl/shaders/glsl.h"
#include "EmuMainWindow.hpp" #include "EmuMainWindow.hpp"

View File

@ -11,7 +11,7 @@
#include "gl_core_3_1.h" #include "gl_core_3_1.h"
#include "cgFunctions.h" #include "cgFunctions.h"
#include "CGLCG.h" #include "CGLCG.h"
#include "../shaders/glsl.h" #include "common/video/opengl/shaders/glsl.h"
#include "wglext.h" #include "wglext.h"
#include "IS9xDisplayOutput.h" #include "IS9xDisplayOutput.h"

View File

@ -1,9 +1,9 @@
#pragma once #pragma once
#include "IS9xDisplayOutput.h" #include "IS9xDisplayOutput.h"
#include "../vulkan/vulkan_context.hpp" #include "common/video/vulkan/vulkan_context.hpp"
#include "../vulkan/vulkan_shader_chain.hpp" #include "common/video/vulkan/vulkan_shader_chain.hpp"
#include "../vulkan/vulkan_simple_output.hpp" #include "common/video/vulkan/vulkan_simple_output.hpp"
#include <functional> #include <functional>
class CVulkan : public IS9xDisplayOutput class CVulkan : public IS9xDisplayOutput

View File

@ -427,9 +427,9 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">true</ExcludedFromBuild>
</CustomBuild> </CustomBuild>
<ClInclude Include="..\msu1.h" /> <ClInclude Include="..\msu1.h" />
<ClInclude Include="..\shaders\glsl.h" /> <ClInclude Include="..\common\video\opengl\shaders\glsl.h" />
<ClInclude Include="..\shaders\shader_helpers.h" /> <ClInclude Include="..\common\video\opengl\shaders\shader_helpers.h" />
<ClInclude Include="..\shaders\shader_platform.h" /> <ClInclude Include="..\common\video\opengl\shaders\shader_platform.h" />
<ClInclude Include="..\external\SPIRV-Cross\spirv.hpp" /> <ClInclude Include="..\external\SPIRV-Cross\spirv.hpp" />
<ClInclude Include="..\external\SPIRV-Cross\spirv_cfg.hpp" /> <ClInclude Include="..\external\SPIRV-Cross\spirv_cfg.hpp" />
<ClInclude Include="..\external\SPIRV-Cross\spirv_common.hpp" /> <ClInclude Include="..\external\SPIRV-Cross\spirv_common.hpp" />
@ -449,17 +449,17 @@
<ClInclude Include="..\unzip\mztools.h" /> <ClInclude Include="..\unzip\mztools.h" />
<ClInclude Include="..\unzip\unzip.h" /> <ClInclude Include="..\unzip\unzip.h" />
<ClInclude Include="..\unzip\zip.h" /> <ClInclude Include="..\unzip\zip.h" />
<ClInclude Include="..\vulkan\slang_helpers.hpp" /> <ClInclude Include="..\common\video\vulkan\slang_helpers.hpp" />
<ClInclude Include="..\vulkan\slang_preset.hpp" /> <ClInclude Include="..\common\video\vulkan\slang_preset.hpp" />
<ClInclude Include="..\vulkan\slang_preset_ini.hpp" /> <ClInclude Include="..\common\video\vulkan\slang_preset_ini.hpp" />
<ClInclude Include="..\vulkan\slang_shader.hpp" /> <ClInclude Include="..\common\video\vulkan\slang_shader.hpp" />
<ClInclude Include="..\vulkan\vulkan_context.hpp" /> <ClInclude Include="..\common\video\vulkan\vulkan_context.hpp" />
<ClInclude Include="..\vulkan\vulkan_pipeline_image.hpp" /> <ClInclude Include="..\common\video\vulkan\vulkan_pipeline_image.hpp" />
<ClInclude Include="..\vulkan\vulkan_shader_chain.hpp" /> <ClInclude Include="..\common\video\vulkan\vulkan_shader_chain.hpp" />
<ClInclude Include="..\vulkan\vulkan_simple_output.hpp" /> <ClInclude Include="..\common\video\vulkan\vulkan_simple_output.hpp" />
<ClInclude Include="..\vulkan\vulkan_slang_pipeline.hpp" /> <ClInclude Include="..\common\video\vulkan\vulkan_slang_pipeline.hpp" />
<ClInclude Include="..\vulkan\vulkan_swapchain.hpp" /> <ClInclude Include="..\common\video\vulkan\vulkan_swapchain.hpp" />
<ClInclude Include="..\vulkan\vulkan_texture.hpp" /> <ClInclude Include="..\common\video\vulkan\vulkan_texture.hpp" />
<ClInclude Include="AVIOutput.h" /> <ClInclude Include="AVIOutput.h" />
<ClInclude Include="CCGShader.h" /> <ClInclude Include="CCGShader.h" />
<ClInclude Include="CD3DCG.h" /> <ClInclude Include="CD3DCG.h" />
@ -575,9 +575,9 @@
<ClCompile Include="..\seta010.cpp" /> <ClCompile Include="..\seta010.cpp" />
<ClCompile Include="..\seta011.cpp" /> <ClCompile Include="..\seta011.cpp" />
<ClCompile Include="..\seta018.cpp" /> <ClCompile Include="..\seta018.cpp" />
<ClCompile Include="..\shaders\glsl.cpp" /> <ClCompile Include="..\common\video\opengl\shaders\glsl.cpp" />
<ClCompile Include="..\shaders\shader_helpers.cpp" /> <ClCompile Include="..\common\video\opengl\shaders\shader_helpers.cpp" />
<ClCompile Include="..\shaders\slang.cpp" /> <ClCompile Include="..\common\video\opengl\shaders\slang.cpp" />
<ClCompile Include="..\external\SPIRV-Cross\spirv_cfg.cpp" /> <ClCompile Include="..\external\SPIRV-Cross\spirv_cfg.cpp" />
<ClCompile Include="..\external\SPIRV-Cross\spirv_cross.cpp" /> <ClCompile Include="..\external\SPIRV-Cross\spirv_cross.cpp" />
<ClCompile Include="..\external\SPIRV-Cross\spirv_cross_parsed_ir.cpp" /> <ClCompile Include="..\external\SPIRV-Cross\spirv_cross_parsed_ir.cpp" />
@ -618,20 +618,20 @@
<ClCompile Include="..\unzip\mztools.c" /> <ClCompile Include="..\unzip\mztools.c" />
<ClCompile Include="..\unzip\unzip.c" /> <ClCompile Include="..\unzip\unzip.c" />
<ClCompile Include="..\unzip\zip.c" /> <ClCompile Include="..\unzip\zip.c" />
<ClCompile Include="..\vulkan\slang_helpers.cpp" /> <ClCompile Include="..\common\video\vulkan\slang_helpers.cpp" />
<ClCompile Include="..\vulkan\slang_preset.cpp" /> <ClCompile Include="..\common\video\vulkan\slang_preset.cpp" />
<ClCompile Include="..\vulkan\slang_preset_ini.cpp" /> <ClCompile Include="..\common\video\vulkan\slang_preset_ini.cpp" />
<ClCompile Include="..\vulkan\slang_preset_test.cpp" /> <ClCompile Include="..\common\video\vulkan\slang_preset_test.cpp" />
<ClCompile Include="..\vulkan\slang_shader.cpp" /> <ClCompile Include="..\common\video\vulkan\slang_shader.cpp" />
<ClCompile Include="..\vulkan\vk_mem_alloc_implementation.cpp" /> <ClCompile Include="..\common\video\vulkan\vk_mem_alloc_implementation.cpp" />
<ClCompile Include="..\vulkan\vulkan_context.cpp" /> <ClCompile Include="..\common\video\vulkan\vulkan_context.cpp" />
<ClCompile Include="..\vulkan\vulkan_hpp_storage.cpp" /> <ClCompile Include="..\common\video\vulkan\vulkan_hpp_storage.cpp" />
<ClCompile Include="..\vulkan\vulkan_pipeline_image.cpp" /> <ClCompile Include="..\common\video\vulkan\vulkan_pipeline_image.cpp" />
<ClCompile Include="..\vulkan\vulkan_shader_chain.cpp" /> <ClCompile Include="..\common\video\vulkan\vulkan_shader_chain.cpp" />
<ClCompile Include="..\vulkan\vulkan_simple_output.cpp" /> <ClCompile Include="..\common\video\vulkan\vulkan_simple_output.cpp" />
<ClCompile Include="..\vulkan\vulkan_slang_pipeline.cpp" /> <ClCompile Include="..\common\video\vulkan\vulkan_slang_pipeline.cpp" />
<ClCompile Include="..\vulkan\vulkan_swapchain.cpp" /> <ClCompile Include="..\common\video\vulkan\vulkan_swapchain.cpp" />
<ClCompile Include="..\vulkan\vulkan_texture.cpp" /> <ClCompile Include="..\common\video\vulkan\vulkan_texture.cpp" />
<ClCompile Include="AVIOutput.cpp" /> <ClCompile Include="AVIOutput.cpp" />
<ClCompile Include="CCGShader.cpp" /> <ClCompile Include="CCGShader.cpp" />
<ClCompile Include="CD3DCG.cpp" /> <ClCompile Include="CD3DCG.cpp" />

View File

@ -237,13 +237,13 @@
<ClInclude Include="..\filter\xbrz_tools.h"> <ClInclude Include="..\filter\xbrz_tools.h">
<Filter>Filter</Filter> <Filter>Filter</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\shaders\glsl.h"> <ClInclude Include="..\common\video\opengl\shaders\glsl.h">
<Filter>Shaders</Filter> <Filter>Shaders</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\shaders\shader_helpers.h"> <ClInclude Include="..\common\video\opengl\shaders\shader_helpers.h">
<Filter>Shaders</Filter> <Filter>Shaders</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\shaders\shader_platform.h"> <ClInclude Include="..\common\video\opengl\shaders\shader_platform.h">
<Filter>Shaders</Filter> <Filter>Shaders</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="gl_core_3_1.h"> <ClInclude Include="gl_core_3_1.h">
@ -300,37 +300,37 @@
<ClInclude Include="CVulkan.h"> <ClInclude Include="CVulkan.h">
<Filter>GUI\VideoDriver</Filter> <Filter>GUI\VideoDriver</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\vulkan\slang_helpers.hpp"> <ClInclude Include="..\common\video\vulkan\slang_helpers.hpp">
<Filter>GUI\VideoDriver\Vulkan</Filter> <Filter>GUI\VideoDriver\Vulkan</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\vulkan\slang_preset.hpp"> <ClInclude Include="..\common\video\vulkan\slang_preset.hpp">
<Filter>GUI\VideoDriver\Vulkan</Filter> <Filter>GUI\VideoDriver\Vulkan</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\vulkan\slang_preset_ini.hpp"> <ClInclude Include="..\common\video\vulkan\slang_preset_ini.hpp">
<Filter>GUI\VideoDriver\Vulkan</Filter> <Filter>GUI\VideoDriver\Vulkan</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\vulkan\slang_shader.hpp"> <ClInclude Include="..\common\video\vulkan\slang_shader.hpp">
<Filter>GUI\VideoDriver\Vulkan</Filter> <Filter>GUI\VideoDriver\Vulkan</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\vulkan\vulkan_context.hpp"> <ClInclude Include="..\common\video\vulkan\vulkan_context.hpp">
<Filter>GUI\VideoDriver\Vulkan</Filter> <Filter>GUI\VideoDriver\Vulkan</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\vulkan\vulkan_pipeline_image.hpp"> <ClInclude Include="..\common\video\vulkan\vulkan_pipeline_image.hpp">
<Filter>GUI\VideoDriver\Vulkan</Filter> <Filter>GUI\VideoDriver\Vulkan</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\vulkan\vulkan_shader_chain.hpp"> <ClInclude Include="..\common\video\vulkan\vulkan_shader_chain.hpp">
<Filter>GUI\VideoDriver\Vulkan</Filter> <Filter>GUI\VideoDriver\Vulkan</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\vulkan\vulkan_slang_pipeline.hpp"> <ClInclude Include="..\common\video\vulkan\vulkan_slang_pipeline.hpp">
<Filter>GUI\VideoDriver\Vulkan</Filter> <Filter>GUI\VideoDriver\Vulkan</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\vulkan\vulkan_swapchain.hpp"> <ClInclude Include="..\common\video\vulkan\vulkan_swapchain.hpp">
<Filter>GUI\VideoDriver\Vulkan</Filter> <Filter>GUI\VideoDriver\Vulkan</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\vulkan\vulkan_texture.hpp"> <ClInclude Include="..\common\video\vulkan\vulkan_texture.hpp">
<Filter>GUI\VideoDriver\Vulkan</Filter> <Filter>GUI\VideoDriver\Vulkan</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\vulkan\vulkan_simple_output.hpp"> <ClInclude Include="..\common\video\vulkan\vulkan_simple_output.hpp">
<Filter>GUI\VideoDriver\Vulkan</Filter> <Filter>GUI\VideoDriver\Vulkan</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\external\imgui\imconfig.h"> <ClInclude Include="..\external\imgui\imconfig.h">
@ -665,10 +665,10 @@
<ClCompile Include="DumpAtEnd.cpp"> <ClCompile Include="DumpAtEnd.cpp">
<Filter>GUI</Filter> <Filter>GUI</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\shaders\glsl.cpp"> <ClCompile Include="..\common\video\opengl\shaders\glsl.cpp">
<Filter>Shaders</Filter> <Filter>Shaders</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\shaders\shader_helpers.cpp"> <ClCompile Include="..\common\video\opengl\shaders\shader_helpers.cpp">
<Filter>Shaders</Filter> <Filter>Shaders</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="gl_core_3_1.c"> <ClCompile Include="gl_core_3_1.c">
@ -680,7 +680,7 @@
<ClCompile Include="image_functions.cpp"> <ClCompile Include="image_functions.cpp">
<Filter>GUI\VideoDriver</Filter> <Filter>GUI\VideoDriver</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\shaders\slang.cpp"> <ClCompile Include="..\common\video\opengl\shaders\slang.cpp">
<Filter>Shaders</Filter> <Filter>Shaders</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\external\SPIRV-Cross\spirv_cfg.cpp"> <ClCompile Include="..\external\SPIRV-Cross\spirv_cfg.cpp">
@ -716,49 +716,49 @@
<ClCompile Include="CVulkan.cpp"> <ClCompile Include="CVulkan.cpp">
<Filter>GUI\VideoDriver</Filter> <Filter>GUI\VideoDriver</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\vulkan\slang_helpers.cpp"> <ClCompile Include="..\common\video\vulkan\slang_helpers.cpp">
<Filter>GUI\VideoDriver\Vulkan</Filter> <Filter>GUI\VideoDriver\Vulkan</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\vulkan\slang_preset.cpp"> <ClCompile Include="..\common\video\vulkan\slang_preset.cpp">
<Filter>GUI\VideoDriver\Vulkan</Filter> <Filter>GUI\VideoDriver\Vulkan</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\vulkan\slang_preset_ini.cpp"> <ClCompile Include="..\common\video\vulkan\slang_preset_ini.cpp">
<Filter>GUI\VideoDriver\Vulkan</Filter> <Filter>GUI\VideoDriver\Vulkan</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\vulkan\slang_preset_test.cpp"> <ClCompile Include="..\common\video\vulkan\slang_preset_test.cpp">
<Filter>GUI\VideoDriver\Vulkan</Filter> <Filter>GUI\VideoDriver\Vulkan</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\vulkan\slang_shader.cpp"> <ClCompile Include="..\common\video\vulkan\slang_shader.cpp">
<Filter>GUI\VideoDriver\Vulkan</Filter> <Filter>GUI\VideoDriver\Vulkan</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\vulkan\vk_mem_alloc_implementation.cpp"> <ClCompile Include="..\common\video\vulkan\vk_mem_alloc_implementation.cpp">
<Filter>GUI\VideoDriver\Vulkan</Filter> <Filter>GUI\VideoDriver\Vulkan</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\vulkan\vulkan_context.cpp"> <ClCompile Include="..\common\video\vulkan\vulkan_context.cpp">
<Filter>GUI\VideoDriver\Vulkan</Filter> <Filter>GUI\VideoDriver\Vulkan</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\vulkan\vulkan_hpp_storage.cpp"> <ClCompile Include="..\common\video\vulkan\vulkan_hpp_storage.cpp">
<Filter>GUI\VideoDriver\Vulkan</Filter> <Filter>GUI\VideoDriver\Vulkan</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\vulkan\vulkan_pipeline_image.cpp"> <ClCompile Include="..\common\video\vulkan\vulkan_pipeline_image.cpp">
<Filter>GUI\VideoDriver\Vulkan</Filter> <Filter>GUI\VideoDriver\Vulkan</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\vulkan\vulkan_shader_chain.cpp"> <ClCompile Include="..\common\video\vulkan\vulkan_shader_chain.cpp">
<Filter>GUI\VideoDriver\Vulkan</Filter> <Filter>GUI\VideoDriver\Vulkan</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\vulkan\vulkan_slang_pipeline.cpp"> <ClCompile Include="..\common\video\vulkan\vulkan_slang_pipeline.cpp">
<Filter>GUI\VideoDriver\Vulkan</Filter> <Filter>GUI\VideoDriver\Vulkan</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\vulkan\vulkan_swapchain.cpp"> <ClCompile Include="..\common\video\vulkan\vulkan_swapchain.cpp">
<Filter>GUI\VideoDriver\Vulkan</Filter> <Filter>GUI\VideoDriver\Vulkan</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\vulkan\vulkan_texture.cpp"> <ClCompile Include="..\common\video\vulkan\vulkan_texture.cpp">
<Filter>GUI\VideoDriver\Vulkan</Filter> <Filter>GUI\VideoDriver\Vulkan</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\external\stb\stb_image_implementation.cpp"> <ClCompile Include="..\external\stb\stb_image_implementation.cpp">
<Filter>GUI\VideoDriver\Vulkan</Filter> <Filter>GUI\VideoDriver\Vulkan</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\vulkan\vulkan_simple_output.cpp"> <ClCompile Include="..\common\video\vulkan\vulkan_simple_output.cpp">
<Filter>GUI\VideoDriver\Vulkan</Filter> <Filter>GUI\VideoDriver\Vulkan</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\external\imgui\imgui.cpp"> <ClCompile Include="..\external\imgui\imgui.cpp">

View File

@ -33,7 +33,7 @@
#include "win32_sound.h" #include "win32_sound.h"
#include "win32_display.h" #include "win32_display.h"
#include "CCGShader.h" #include "CCGShader.h"
#include "../shaders/glsl.h" #include "common/video/opengl/shaders/glsl.h"
#include "CShaderParamDlg.h" #include "CShaderParamDlg.h"
#include "CSaveLoadWithPreviewDlg.h" #include "CSaveLoadWithPreviewDlg.h"
#include "../snes9x.h" #include "../snes9x.h"