mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2024-11-22 11:29:24 +01:00
Add start sequence faking
This commit is contained in:
parent
6d8fd6fc92
commit
5a0a4dbb82
@ -1,5 +1,7 @@
|
||||
#include <unistd.h> /* unlink */
|
||||
|
||||
#include <C64.h>
|
||||
|
||||
#include "menu.hh"
|
||||
#include "file_browser.hh"
|
||||
#include "game_info.hh"
|
||||
@ -25,6 +27,8 @@ public:
|
||||
|
||||
void setDirectory(const char *path);
|
||||
|
||||
void runStartSequence(bool what);
|
||||
|
||||
/* Inherited */
|
||||
void runLogic();
|
||||
|
||||
@ -43,6 +47,7 @@ public:
|
||||
DiscMenu(Font *font) :
|
||||
FileBrowser(game_exts, font), TimeoutHandler()
|
||||
{
|
||||
this->runStartSequence = false;
|
||||
}
|
||||
|
||||
~DiscMenu()
|
||||
@ -101,6 +106,9 @@ public:
|
||||
else
|
||||
Gui::gui->updateGameInfo(new GameInfo(fileName));
|
||||
Gui::gui->popView();
|
||||
|
||||
if (this->runStartSequence)
|
||||
TheC64->startFakeKeySequence("\nLOAD \"*\",8,1\nRUN\n");
|
||||
}
|
||||
|
||||
virtual void hoverCallback(int which)
|
||||
@ -120,6 +128,8 @@ public:
|
||||
Gui::gui->timerController->disarm(this);
|
||||
Gui::gui->popView();
|
||||
}
|
||||
|
||||
bool runStartSequence;
|
||||
};
|
||||
|
||||
|
||||
@ -145,6 +155,11 @@ void DiscView::setDirectory(const char *path)
|
||||
this->menu->setDirectory(path);
|
||||
}
|
||||
|
||||
void DiscView::runStartSequence(bool what)
|
||||
{
|
||||
this->menu->runStartSequence = what;
|
||||
}
|
||||
|
||||
void DiscView::runLogic()
|
||||
{
|
||||
this->menu->runLogic();
|
||||
|
@ -57,10 +57,10 @@ public:
|
||||
this->updatePauseState();
|
||||
break;
|
||||
case 2: /* Insert disc */
|
||||
if (this->p_submenus[0].sel == 0) {
|
||||
Gui::gui->dv->setDirectory("discs");
|
||||
Gui::gui->pushView(Gui::gui->dv);
|
||||
}
|
||||
Gui::gui->dv->setDirectory("discs");
|
||||
Gui::gui->pushView(Gui::gui->dv);
|
||||
|
||||
Gui::gui->dv->runStartSequence(this->p_submenus[0].sel == 1);
|
||||
break;
|
||||
case 4: /* Load/save states */
|
||||
break;
|
||||
|
@ -33,6 +33,11 @@ public:
|
||||
return this->have_a_break;
|
||||
}
|
||||
|
||||
void startFakeKeySequence(const char *what)
|
||||
{
|
||||
printf("Faking %s\n", what);
|
||||
}
|
||||
|
||||
int network_connection_type;
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user