Skip to content

Commit a29ffff

Browse files
committed
Fix Windows builds and regression tests for SDL3.
1 parent 815d409 commit a29ffff

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

src/SDLmzx.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ static inline HWND SDL_GetWindowProperty_HWND(SDL_Window *window)
163163
static inline void *SDL_GetWindowProperty_HWND(SDL_Window *window)
164164
{
165165
return SDL_GetProperty(SDL_GetWindowProperties(window),
166-
SDL_PROPERTY_WINDOW_WIN32_HWND_POINTER, NULL);
166+
SDL_PROP_WINDOW_WIN32_HWND_POINTER, NULL);
167167
}
168168
#endif /* _WIN32 */
169169

src/main.c

+4
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@
5656

5757
#ifdef CONFIG_SDL
5858
#if CONFIG_SDL == 3
59+
#ifdef _WIN32
60+
#define WIN32_LEAN_AND_MEAN
61+
#include <windows.h>
62+
#endif
5963
#include <SDL3/SDL_main.h>
6064
#else
6165
#include <SDL.h> /* SDL_main */

testworlds/run.sh

+4
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,12 @@ fi
8282
# Coupled with the software renderer, this will disable video in MZX, speeding things up
8383
# and allowing for automated testing. Disabling the SDL audio driver will prevent annoying
8484
# noises from occuring during tests, but shouldn't affect audio-related tests.
85+
# SDL 1.2 and SDL2
8586
export SDL_VIDEODRIVER=dummy
8687
export SDL_AUDIODRIVER=dummy
88+
# SDL3
89+
export SDL_VIDEO_DRIVER=dummy
90+
export SDL_AUDIO_DRIVER=dummy
8791

8892
# Standalone mode will allow tests.mzx to terminate MZX and no_titlescreen mode
8993
# simplifies things. Disable auto update checking to save time. Some platforms

unit/configure.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include "../src/io/vio.h"
3232

3333
#ifdef CONFIG_SDL
34-
#include <SDL_version.h>
34+
#include "../src/SDLmzx.h"
3535
#endif
3636

3737
#ifdef CONFIG_EDITOR

0 commit comments

Comments
 (0)