MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / do_start_program

Function do_start_program

src/main.cpp:1543–1563  ·  view source on GitHub ↗

Okay, this stuff looks strange, but it is here to encourage people who * port UAE to re-use as much of this code as possible. Functions that you * should be using are do_start_program () and do_leave_program (), as well * as real_main (). Some OSes don't call main () (which is braindamaged IMHO, * but unfortunately very common), so you need to call real_main () from * whatever entry point you have

Source from the content-addressed store, hash-verified

1541* Add #ifdefs around these as appropriate.
1542*/
1543static void do_start_program ()
1544{
1545 if (quit_program == -UAE_QUIT)
1546 return;
1547 /* Do a reset on startup. Whether this is elegant is debatable. */
1548 inputdevice_updateconfig (&changed_prefs, &currprefs);
1549 if (quit_program >= 0)
1550 quit_program = UAE_RESET;
1551#ifdef WITH_LUA
1552 uae_lua_loadall ();
1553#endif
1554 try
1555 {
1556 emulating = 1;
1557 m68k_go (1);
1558 }
1559 catch (...)
1560 {
1561 write_log("An exception was thrown while running m68k_go!\n");
1562 }
1563}
1564
1565static void start_program ()
1566{

Callers 1

start_programFunction · 0.85

Calls 4

inputdevice_updateconfigFunction · 0.85
uae_lua_loadallFunction · 0.85
m68k_goFunction · 0.85
write_logFunction · 0.70

Tested by

no test coverage detected