File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -420,7 +420,7 @@ add_sdl_test_executable(testdialog SOURCES testdialog.c)
420
420
add_sdl_test_executable (testtime SOURCES testtime.c )
421
421
add_sdl_test_executable (testmanymouse SOURCES testmanymouse.c )
422
422
add_sdl_test_executable (testmodal SOURCES testmodal.c )
423
- add_sdl_test_executable (testtray SOURCES testtray.c )
423
+ add_sdl_test_executable (testtray NEEDS_RESOURCES TESTUTILS SOURCES testtray.c )
424
424
425
425
426
426
add_sdl_test_executable (testprocess
Original file line number Diff line number Diff line change
1
+ #include "testutils.h"
1
2
#include <SDL3/SDL.h>
2
3
#include <SDL3/SDL_main.h>
3
4
#include <SDL3/SDL_test.h>
@@ -520,14 +521,17 @@ int main(int argc, char **argv)
520
521
goto quit ;
521
522
}
522
523
523
- /* TODO: Resource paths? */
524
- SDL_Surface * icon = SDL_LoadBMP ("../test/sdl-test_round.bmp" );
524
+ char * icon1filename = GetResourceFilename (NULL , "sdl-test_round.bmp" );
525
+ SDL_Surface * icon = SDL_LoadBMP (icon1filename );
526
+ SDL_free (icon1filename );
525
527
526
528
if (!icon ) {
527
529
SDL_Log ("Couldn't load icon 1, proceeding without: %s" , SDL_GetError ());
528
530
}
529
531
530
- SDL_Surface * icon2 = SDL_LoadBMP ("../test/speaker.bmp" );
532
+ char * icon2filename = GetResourceFilename (NULL , "speaker.bmp" );
533
+ SDL_Surface * icon2 = SDL_LoadBMP (icon2filename );
534
+ SDL_free (icon2filename );
531
535
532
536
if (!icon2 ) {
533
537
SDL_Log ("Couldn't load icon 2, proceeding without: %s" , SDL_GetError ());
You can’t perform that action at this time.
0 commit comments