Testing functions to open files from bundle

This commit is contained in:
Francesco Abbate
2021-04-18 17:08:35 +02:00
parent 032018ec48
commit f913a8513f
4 changed files with 67 additions and 0 deletions
+7
View File
@@ -13,6 +13,7 @@
#include <X11/Xresource.h>
#elif __APPLE__
#include <mach-o/dyld.h>
#include "bundle_open.h"
#endif
@@ -102,6 +103,12 @@ int main(int argc, char **argv) {
SetProcessDPIAware();
#endif
#ifdef __APPLE__
const char *resource_path = resource_path_from_bundle();
fprintf(stderr, "resource path: %s\n", resource_path);
free(resource_path);
#endif
SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVENTS);
SDL_EnableScreenSaver();
SDL_EventState(SDL_DROPFILE, SDL_ENABLE);