diff --git a/src/nostalgia/player/CMakeLists.txt b/src/nostalgia/player/CMakeLists.txt index 2a9d406b..257d4419 100644 --- a/src/nostalgia/player/CMakeLists.txt +++ b/src/nostalgia/player/CMakeLists.txt @@ -7,8 +7,8 @@ add_executable( if(COMMAND OBJCOPY_FILE) set_target_properties(nostalgia PROPERTIES - LINK_FLAGS ${LINKER_FLAGS} - COMPILER_FLAGS "-mthumb -mthumb-interwork" + LINK_FLAGS ${LINKER_FLAGS} + COMPILER_FLAGS "-mthumb -mthumb-interwork" ) OBJCOPY_FILE(nostalgia) diff --git a/src/nostalgia/player/main.cpp b/src/nostalgia/player/main.cpp index 52ba0176..7feb2187 100644 --- a/src/nostalgia/player/main.cpp +++ b/src/nostalgia/player/main.cpp @@ -12,7 +12,7 @@ using namespace nostalgia::common; using namespace nostalgia::core; using namespace nostalgia::world; -int main() { +int run() { ox::FileSystem32 fs(ox::FileStore32(loadRom(), 33554432)); // 32 MB Context ctx; init(&ctx); @@ -22,3 +22,21 @@ int main() { while (1); return 0; } + +#ifndef OX_USE_STDLIB + +extern "C" { + +void _start() { + run(); +} + +} + +#else + +int main() { + return run(); +} + +#endif