- Ja compila el release en mac

This commit is contained in:
2023-10-23 18:21:48 +02:00
parent 4984d9fd21
commit 2631112a4b
3 changed files with 20 additions and 6 deletions

View File

@@ -4,6 +4,10 @@
#include <SDL2/SDL.h>
#include <map>
#ifdef MACOS_BUNDLE
#include <libgen.h>
#endif
namespace game
{
bool windowHasFocus = true;
@@ -41,6 +45,13 @@ namespace game
int main(int argc, char *argv[])
{
#ifdef MACOS_BUNDLE
char res_file[255] = "";
strcpy(res_file, dirname(argv[0]));
strcat(res_file, "/../Resources/data.jf2");
file::setResourceFilename(res_file);
#endif
game::windowHasFocus = true;
game::init();
input::init(draw::getZoom());