[nostalgia/player] Replace main with _start in GBA builds
This commit is contained in:
parent
36d8aeabd3
commit
eba7d402c9
@ -7,8 +7,8 @@ add_executable(
|
|||||||
if(COMMAND OBJCOPY_FILE)
|
if(COMMAND OBJCOPY_FILE)
|
||||||
set_target_properties(nostalgia
|
set_target_properties(nostalgia
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
LINK_FLAGS ${LINKER_FLAGS}
|
LINK_FLAGS ${LINKER_FLAGS}
|
||||||
COMPILER_FLAGS "-mthumb -mthumb-interwork"
|
COMPILER_FLAGS "-mthumb -mthumb-interwork"
|
||||||
)
|
)
|
||||||
|
|
||||||
OBJCOPY_FILE(nostalgia)
|
OBJCOPY_FILE(nostalgia)
|
||||||
|
@ -12,7 +12,7 @@ using namespace nostalgia::common;
|
|||||||
using namespace nostalgia::core;
|
using namespace nostalgia::core;
|
||||||
using namespace nostalgia::world;
|
using namespace nostalgia::world;
|
||||||
|
|
||||||
int main() {
|
int run() {
|
||||||
ox::FileSystem32 fs(ox::FileStore32(loadRom(), 33554432)); // 32 MB
|
ox::FileSystem32 fs(ox::FileStore32(loadRom(), 33554432)); // 32 MB
|
||||||
Context ctx;
|
Context ctx;
|
||||||
init(&ctx);
|
init(&ctx);
|
||||||
@ -22,3 +22,21 @@ int main() {
|
|||||||
while (1);
|
while (1);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef OX_USE_STDLIB
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
|
||||||
|
void _start() {
|
||||||
|
run();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
return run();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user