mirror of
https://github.com/cmosher01/Epple-II.git
synced 2024-12-23 05:30:12 +00:00
exit full screen before dialogs
This commit is contained in:
parent
303f7b6a5e
commit
c6c4eea94b
@ -270,6 +270,7 @@ void Config::tryParseLine(const std::string& line, Memory& ram, Memory& rom, Slo
|
||||
std::getline(tok,fn_optional);
|
||||
trim(fn_optional);
|
||||
if (fn_optional.length() == 0) {
|
||||
gui.exitFullScreen();
|
||||
char const *ft[1] = { "*.woz" };
|
||||
char const *fn = tinyfd_openFileDialog("Load floppy", "", 1, ft, "WOZ 2.0 disk images", 0);
|
||||
if (fn) {
|
||||
|
@ -368,6 +368,7 @@ void Emulator::dispatchKeypress(const SDL_KeyboardEvent& keyEvent) {
|
||||
return;
|
||||
}// ...else exit the entire emulation
|
||||
else if (sym == SDLK_F9) {
|
||||
this->screenImage.exitFullScreen();
|
||||
if (isSafeToQuit()) {
|
||||
this->quit = true;
|
||||
}
|
||||
|
@ -63,6 +63,12 @@ cassettename(32, ' ') {
|
||||
createScreen();
|
||||
}
|
||||
|
||||
void ScreenImage::exitFullScreen() {
|
||||
if (this->fullscreen) {
|
||||
toggleFullScreen();
|
||||
}
|
||||
}
|
||||
|
||||
void ScreenImage::toggleFullScreen() {
|
||||
this->fullscreen = !this->fullscreen;
|
||||
const int flags = this->fullscreen ? SDL_WINDOW_FULLSCREEN : 0;
|
||||
|
@ -51,6 +51,7 @@ public:
|
||||
ScreenImage();
|
||||
~ScreenImage();
|
||||
|
||||
void exitFullScreen();
|
||||
void toggleFullScreen();
|
||||
void drawPower(bool on);
|
||||
void notifyObservers();
|
||||
|
Loading…
Reference in New Issue
Block a user