mirror of https://github.com/libsdl-org/SDL.git
test: Fix resource paths in testtray
Signed-off-by: Marcin Serwin <marcin@serwin.dev>
This commit is contained in:
parent
796961acec
commit
bbc674b9e7
|
|
@ -420,7 +420,7 @@ add_sdl_test_executable(testdialog SOURCES testdialog.c)
|
||||||
add_sdl_test_executable(testtime SOURCES testtime.c)
|
add_sdl_test_executable(testtime SOURCES testtime.c)
|
||||||
add_sdl_test_executable(testmanymouse SOURCES testmanymouse.c)
|
add_sdl_test_executable(testmanymouse SOURCES testmanymouse.c)
|
||||||
add_sdl_test_executable(testmodal SOURCES testmodal.c)
|
add_sdl_test_executable(testmodal SOURCES testmodal.c)
|
||||||
add_sdl_test_executable(testtray SOURCES testtray.c)
|
add_sdl_test_executable(testtray NEEDS_RESOURCES TESTUTILS SOURCES testtray.c)
|
||||||
|
|
||||||
|
|
||||||
add_sdl_test_executable(testprocess
|
add_sdl_test_executable(testprocess
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
#include "testutils.h"
|
||||||
#include <SDL3/SDL.h>
|
#include <SDL3/SDL.h>
|
||||||
#include <SDL3/SDL_main.h>
|
#include <SDL3/SDL_main.h>
|
||||||
#include <SDL3/SDL_test.h>
|
#include <SDL3/SDL_test.h>
|
||||||
|
|
@ -520,14 +521,17 @@ int main(int argc, char **argv)
|
||||||
goto quit;
|
goto quit;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: Resource paths? */
|
char *icon1filename = GetResourceFilename(NULL, "sdl-test_round.bmp");
|
||||||
SDL_Surface *icon = SDL_LoadBMP("../test/sdl-test_round.bmp");
|
SDL_Surface *icon = SDL_LoadBMP(icon1filename);
|
||||||
|
SDL_free(icon1filename);
|
||||||
|
|
||||||
if (!icon) {
|
if (!icon) {
|
||||||
SDL_Log("Couldn't load icon 1, proceeding without: %s", SDL_GetError());
|
SDL_Log("Couldn't load icon 1, proceeding without: %s", SDL_GetError());
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_Surface *icon2 = SDL_LoadBMP("../test/speaker.bmp");
|
char *icon2filename = GetResourceFilename(NULL, "speaker.bmp");
|
||||||
|
SDL_Surface *icon2 = SDL_LoadBMP(icon2filename);
|
||||||
|
SDL_free(icon2filename);
|
||||||
|
|
||||||
if (!icon2) {
|
if (!icon2) {
|
||||||
SDL_Log("Couldn't load icon 2, proceeding without: %s", SDL_GetError());
|
SDL_Log("Couldn't load icon 2, proceeding without: %s", SDL_GetError());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue