mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-10-30 08:01:01 +00:00
Fix crash screen on DirectX
This commit is contained in:
parent
0a54b7ebed
commit
bb12aebb9e
2 changed files with 7 additions and 3 deletions
|
|
@ -1 +1 @@
|
||||||
make RENDER_API=D3D12 WINDOW_API=DXGI BETTERCAMERA=1 NODRAWINGDISTANCE=1 DEBUG=1 IMMEDIATELOAD=1 DEVELOPMENT=1 && ./build/us_pc/sm64.us.f3dex2e.exe
|
make RENDER_API=D3D11 WINDOW_API=DXGI BETTERCAMERA=1 NODRAWINGDISTANCE=1 DEBUG=1 IMMEDIATELOAD=1 DEVELOPMENT=1 && ./build/us_pc/sm64.us.f3dex2e.exe
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,11 @@
|
||||||
// Adapted from PeachyPeach's sm64pc-omm
|
// Adapted from PeachyPeach's sm64pc-omm
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32) && !defined(WAPI_DUMMY)
|
||||||
|
|
||||||
#ifdef HAVE_SDL2
|
#ifdef HAVE_SDL2
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <dbghelp.h>
|
#include <dbghelp.h>
|
||||||
|
|
@ -462,6 +465,7 @@ static CRASH_HANDLER_TYPE crash_handler(EXCEPTION_POINTERS *ExceptionInfo) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// sounds
|
// sounds
|
||||||
|
#ifdef HAVE_SDL2
|
||||||
if (SDL_WasInit(SDL_INIT_AUDIO) || SDL_InitSubSystem(SDL_INIT_AUDIO) == 0) {
|
if (SDL_WasInit(SDL_INIT_AUDIO) || SDL_InitSubSystem(SDL_INIT_AUDIO) == 0) {
|
||||||
SDL_AudioSpec want, have;
|
SDL_AudioSpec want, have;
|
||||||
want.freq = 32000;
|
want.freq = 32000;
|
||||||
|
|
@ -475,6 +479,7 @@ static CRASH_HANDLER_TYPE crash_handler(EXCEPTION_POINTERS *ExceptionInfo) {
|
||||||
SDL_PauseAudioDevice(device, 0);
|
SDL_PauseAudioDevice(device, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Main loop
|
// Main loop
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
@ -492,4 +497,3 @@ __attribute__((constructor)) static void init_crash_handler() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue