early-access version 2835

This commit is contained in:
pineappleEA
2022-07-15 04:00:50 +02:00
parent 5c0ee5eba6
commit 0e7aef7e36
1173 changed files with 55320 additions and 18881 deletions

View File

@@ -1,5 +1,5 @@
/*
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -23,6 +23,7 @@
#endif
#include "SDL.h"
#include "testutils.h"
#define MOOSEPIC_W 64
#define MOOSEPIC_H 88
@@ -128,6 +129,7 @@ main(int argc, char **argv)
{
SDL_Window *window;
SDL_RWops *handle;
char *filename = NULL;
/* Enable standard application logging */
SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
@@ -138,7 +140,13 @@ main(int argc, char **argv)
}
/* load the moose images */
handle = SDL_RWFromFile("moose.dat", "rb");
filename = GetResourceFilename(NULL, "moose.dat");
if (filename == NULL) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Out of memory\n");
return -1;
}
handle = SDL_RWFromFile(filename, "rb");
SDL_free(filename);
if (handle == NULL) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Can't find the file moose.dat !\n");
quit(2);