commit f105f11e7c7d14eb5c613d5672395f5b5666ff4d
Author: Jon Bell <j.to.the.bell@gmail.com>
AuthorDate: Wed Mar 9 08:39:02 2022 -0700
Commit: Jon Bell <j.to.the.bell@gmail.com>
CommitDate: Wed Mar 9 08:39:02 2022 -0700
add pause menu band aid when using flip
---
source/vm.cpp | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/source/vm.cpp b/source/vm.cpp
index c90a91f..8f88a3d 100644
--- a/source/vm.cpp
+++ b/source/vm.cpp
@@ -441,7 +441,6 @@ void Vm::UpdateAndDraw() {
_picoFrameCount++;
- //todo: pause menu here, but for now just load bios
if (_input->btnp(6)) {
togglePauseMenu();
}
@@ -861,8 +860,9 @@ void Vm::vm_flip() {
//todo: pause menu here, but for now just load bios
if (_input->btnp(6)) {
- QueueCartChange(BiosCartName);
-
+ //QueueCartChange(BiosCartName);
+ togglePauseMenu();
+
//shouldn't get here
return;
}
@@ -874,6 +874,17 @@ void Vm::vm_flip() {
uint8_t* picoFb = GetPicoInteralFb();
uint8_t* screenPaletteMap = GetScreenPaletteMap();
+ if (_pauseMenu){
+ //pause menu probably needs refactor out of lua. For now this is better than just quitting
+ lua_getglobal(_luaState, "__f08_menu_update");
+ lua_call(_luaState, 0, 0);
+ lua_pop(_luaState, 0);
+
+ lua_getglobal(_luaState, "__f08_menu_draw");
+ lua_call(_luaState, 0, 0);
+ lua_pop(_luaState, 0);
+ }
+
_host->drawFrame(picoFb, screenPaletteMap, _memory->drawState.drawMode);
//is this better at the end of the loop?