atirage: framebuffer rendering and various improvements.

This commit is contained in:
Maxim Poliakovski
2021-09-11 21:02:46 +02:00
parent 9ce15be106
commit ea5b0d9f52
7 changed files with 236 additions and 27 deletions
+8 -7
View File
@@ -47,6 +47,7 @@ void sigint_handler(int signum) {
LOG_F(INFO, "Shutting down...");
delete gMachineObj.release();
SDL_Quit();
exit(0);
}
@@ -164,6 +165,11 @@ int main(int argc, char** argv) {
cout << "BootROM path: " << bootrom_path << endl;
cout << "Execution mode: " << execution_mode << endl;
if (SDL_Init(SDL_INIT_VIDEO)) {
LOG_F(ERROR, "SDL_Init error: %s", SDL_GetError());
return 0;
}
// initialize global profiler object
gProfilerObj.reset(new Profiler());
@@ -174,13 +180,6 @@ int main(int argc, char** argv) {
// redirect SIGINT to our own handler
signal(SIGINT, sigint_handler);
#ifdef SDL
if (SDL_Init(SDL_INIT_AUDIO)){
LOG_F(ERROR, "SDL_Init error: %s", SDL_GetError());
return 0;
}
#endif
switch (execution_mode) {
case 0:
interpreter_main_loop();
@@ -198,5 +197,7 @@ bail:
delete gMachineObj.release();
SDL_Quit();
return 0;
}