mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-03-04 20:27:57 +00:00
Boot game in EmuScreen::update instead of the constructor. Avoids issues with starting games from the command line.
This commit is contained in:
parent
5b32d2ecaf
commit
7462d988cf
@ -54,12 +54,11 @@
|
||||
|
||||
|
||||
EmuScreen::EmuScreen(const std::string &filename)
|
||||
: gamePath_(filename), invalid_(true), pauseTrigger_(false) {
|
||||
|
||||
bootGame(filename);
|
||||
: booted_(false), gamePath_(filename), invalid_(true), pauseTrigger_(false) {
|
||||
}
|
||||
|
||||
void EmuScreen::bootGame(const std::string &filename) {
|
||||
booted_ = true;
|
||||
std::string fileToStart = filename;
|
||||
// This is probably where we should start up the emulated PSP.
|
||||
INFO_LOG(BOOT, "Starting up hardware.");
|
||||
@ -398,6 +397,9 @@ void EmuScreen::CreateViews() {
|
||||
}
|
||||
|
||||
void EmuScreen::update(InputState &input) {
|
||||
if (!booted_)
|
||||
bootGame(gamePath_);
|
||||
|
||||
UIScreen::update(input);
|
||||
|
||||
// Simply forcibily update to the current screen size every frame. Doesn't cost much.
|
||||
|
@ -52,6 +52,7 @@ private:
|
||||
void setVKeyAnalogX(int stick, int virtualKeyMin, int virtualKeyMax);
|
||||
void setVKeyAnalogY(int stick, int virtualKeyMin, int virtualKeyMax);
|
||||
|
||||
bool booted_;
|
||||
std::string gamePath_;
|
||||
// Something invalid was loaded, don't try to emulate
|
||||
bool invalid_;
|
||||
|
Loading…
x
Reference in New Issue
Block a user