From 0a31253e273ec67f49f57855399e7716ec36255b Mon Sep 17 00:00:00 2001 From: MysterD Date: Sat, 25 Nov 2023 14:41:49 -0800 Subject: [PATCH] Fix directx compile, disable loading screen for directx --- src/pc/gfx/gfx_dxgi.cpp | 6 +++--- src/pc/pc_main.c | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/pc/gfx/gfx_dxgi.cpp b/src/pc/gfx/gfx_dxgi.cpp index 80fc20b5..18db4bba 100644 --- a/src/pc/gfx/gfx_dxgi.cpp +++ b/src/pc/gfx/gfx_dxgi.cpp @@ -20,6 +20,9 @@ #endif #include +#define DECLARE_GFX_DXGI_FUNCTIONS +#include "gfx_dxgi.h" + #include "../configfile.h" #include "../pc_main.h" @@ -38,9 +41,6 @@ extern "C" { #define WINCLASS_NAME L"N64GAME" -#define DECLARE_GFX_DXGI_FUNCTIONS -#include "gfx_dxgi.h" - #ifdef VERSION_EU #define FRAME_INTERVAL_US_NUMERATOR 40000 #define FRAME_INTERVAL_US_DENOMINATOR 2 diff --git a/src/pc/pc_main.c b/src/pc/pc_main.c index 9332b1be..e0f8519e 100644 --- a/src/pc/pc_main.c +++ b/src/pc/pc_main.c @@ -337,11 +337,15 @@ int main(int argc, char *argv[]) { } // Start the thread for setting up the game +#ifndef WAPI_DXGI if (pthread_mutex_init(&gLoadingThreadMutex, NULL) == 0 && pthread_create(&gLoadingThreadId, NULL, main_game_init, (void*) 1) == 0) { gIsThreaded = true; render_loading_screen(); // Render the loading screen while the game is setup gIsThreaded = false; } else { +#else + { +#endif main_game_init(NULL); // Failsafe incase threading doesn't work } pthread_mutex_destroy(&gLoadingThreadMutex);