diff --git a/src/main.c b/src/main.c index f5048c0..8e6fc73 100644 --- a/src/main.c +++ b/src/main.c @@ -586,14 +586,11 @@ static void pollEvent() } break; case SDL_QUIT: - platform.studio->quit = true; - // exitStudio(); + exitStudio(); break; default: break; } - - // return &event; } // if(platform.mode != TIC_RUN_MODE) @@ -604,22 +601,10 @@ static void pollEvent() processMouse(); processGamepad(); processKeyboard(); - - // if(platform.mode == TIC_RUN_MODE) - // { - // if(platform.studio->tic->input.gamepad) processGamepadInput(); - // if(platform.studio->tic->input.mouse) processMouseInput(); - // if(platform.studio->tic->input.keyboard) processKeyboardInput(); - // } - // else - // { - // processGamepadInput(); - // } } static void blitTexture() { - // tic_mem* tic = platform.studio->tic; SDL_Rect rect = {0, 0, 0, 0}; calcTextureRect(&rect); @@ -629,40 +614,6 @@ static void blitTexture() studioTick(pixels); - // tic_scanline scanline = NULL; - // tic_overlap overlap = NULL; - // void* data = NULL; - - // switch(platform.mode) - // { - // case TIC_RUN_MODE: - // scanline = tic->api.scanline; - // overlap = tic->api.overlap; - // break; - // case TIC_SPRITE_MODE: - // { - // Sprite* sprite = platform.editor[platform.bank.index.sprites].sprite; - // overlap = sprite->overlap; - // data = sprite; - // } - // break; - // case TIC_MAP_MODE: - // { - // Map* map = platform.editor[platform.bank.index.map].map; - // overlap = map->overlap; - // data = map; - // } - // break; - // default: - // break; - // } - - // tic->api.blit(tic, scanline, overlap, data); - // SDL_memcpy(pixels, tic->screen, sizeof tic->screen); - - // recordFrame(pixels); - // drawDesyncLabel(pixels); - SDL_UnlockTexture(platform.texture); { diff --git a/src/studio.c b/src/studio.c index a6d9a77..ac01858 100644 --- a/src/studio.c +++ b/src/studio.c @@ -1463,118 +1463,6 @@ void updateStudioProject() } -// SDL_Event* pollEvent() -// { -// static SDL_Event event; - -// if(SDL_PollEvent(&event)) -// { -// switch(event.type) -// { -// case SDL_KEYDOWN: -// if(processShortcuts(&event.key)) return NULL; -// break; -// case SDL_JOYDEVICEADDED: -// { -// s32 id = event.jdevice.which; - -// if (id < TIC_GAMEPADS) -// { -// if(studioImpl.joysticks[id]) -// SDL_JoystickClose(studioImpl.joysticks[id]); - -// studioImpl.joysticks[id] = SDL_JoystickOpen(id); -// } -// } -// break; - -// case SDL_JOYDEVICEREMOVED: -// { -// s32 id = event.jdevice.which; - -// if (id < TIC_GAMEPADS && studioImpl.joysticks[id]) -// { -// SDL_JoystickClose(studioImpl.joysticks[id]); -// studioImpl.joysticks[id] = NULL; -// } -// } -// break; -// case SDL_WINDOWEVENT: -// switch(event.window.event) -// { -// case SDL_WINDOWEVENT_RESIZED: updateGamepadParts(); break; -// case SDL_WINDOWEVENT_FOCUS_GAINED: - -// #if defined(TIC80_PRO) - -// if(studioImpl.mode != TIC_START_MODE) -// { -// Console* console = studioImpl.console; - -// u64 mdate = fsMDate(console->fs, console->romName); - -// if(studioImpl.cart.mdate && mdate > studioImpl.cart.mdate) -// { -// if(studioCartChanged()) -// { -// static const char* Rows[] = -// { -// "", -// "CART HAS CHANGED!", -// "", -// "DO YOU WANT", -// "TO RELOAD IT?" -// }; - -// showDialog(Rows, COUNT_OF(Rows), reloadConfirm, NULL); -// } -// else console->updateProject(console); -// } -// } - -// #endif -// { -// Code* code = studioImpl.editor[studioImpl.bank.index.code].code; -// studioImpl.console->codeLiveReload.reload(studioImpl.console, code->src); -// if(studioImpl.console->codeLiveReload.active && code->update) -// code->update(code); -// } -// break; -// } -// break; -// case SDL_FINGERUP: -// showSoftKeyboard(); -// break; -// case SDL_QUIT: -// exitStudio(); -// break; -// default: -// break; -// } - -// return &event; -// } - -// if(studioImpl.mode != TIC_RUN_MODE) -// processGesture(); - -// if(!studioImpl.gesture.active) -// processMouse(); - -// if(studioImpl.mode == TIC_RUN_MODE) -// { -// if(studioImpl.studio.tic->input.gamepad) processGamepadInput(); -// if(studioImpl.studio.tic->input.mouse) processMouseInput(); -// if(studioImpl.studio.tic->input.keyboard) processKeyboardInput(); -// } -// else -// { -// processGamepadInput(); -// } - -// return NULL; -// } - static void drawRecordLabel(u32* frame, s32 sx, s32 sy, const u32* color) { static const u16 RecLabel[] =