diff --git a/src/emucore/FrameBuffer.cxx b/src/emucore/FrameBuffer.cxx index 089285943..0010ba982 100644 --- a/src/emucore/FrameBuffer.cxx +++ b/src/emucore/FrameBuffer.cxx @@ -748,7 +748,8 @@ void FrameBuffer::drawFrameStats(float framesPerSecond) myStatsMsg.w, color, TextAlign::Left, 0, true, kBGColor); } - myStatsMsg.surface->setDstPos(imageRect().x() + 10, imageRect().y() + 8); + myStatsMsg.surface->setDstPos(imageRect().x() + imageRect().w() / 64, + imageRect().y() + imageRect().h() / 64); myStatsMsg.surface->setDstSize(myStatsMsg.w * hidpiScaleFactor(), myStatsMsg.h * hidpiScaleFactor()); myStatsMsg.surface->render(); @@ -822,7 +823,7 @@ inline bool FrameBuffer::drawMessage() // Draw the bounded box and text const Common::Rect& dst = myMsg.surface->dstRect(); const int fontWidth = font().getMaxCharWidth(), - fontHeight = font().getFontHeight(); + fontHeight = font().getFontHeight(); const int VBORDER = fontHeight / 4; const int HBORDER = fontWidth * 1.25 / 2.0; constexpr int BORDER = 1; diff --git a/src/emucore/OSystem.cxx b/src/emucore/OSystem.cxx index 607c6f281..e39249116 100644 --- a/src/emucore/OSystem.cxx +++ b/src/emucore/OSystem.cxx @@ -292,32 +292,6 @@ void OSystem::setConfigPaths() buildDirIfRequired(myCfgDir, myBaseDir, "cfg"); #endif -#ifdef IMAGE_SUPPORT - const string_view ssSaveDir = mySettings->getString("snapsavedir"); - if(ssSaveDir == EmptyString) - mySnapshotSaveDir = userDir(); - else - mySnapshotSaveDir = FSNode(ssSaveDir); - if(!mySnapshotSaveDir.isDirectory()) - mySnapshotSaveDir.makeDir(); - - const string_view ssLoadDir = mySettings->getString("snaploaddir"); - if(ssLoadDir == EmptyString) - mySnapshotLoadDir = userDir(); - else - mySnapshotLoadDir = FSNode(ssLoadDir); - if(!mySnapshotLoadDir.isDirectory()) - mySnapshotLoadDir.makeDir(); - - const string_view bezelDir = mySettings->getString("bezeldir"); - if(bezelDir == EmptyString) - myBezelDir = userDir(); - else - myBezelDir = FSNode(bezelDir); - if(!myBezelDir.isDirectory()) - myBezelDir.makeDir(); -#endif - myCheatFile = myBaseDir; myCheatFile /= "stella.cht"; myPaletteFile = myBaseDir; myPaletteFile /= "stella.pal"; @@ -333,11 +307,56 @@ void OSystem::setConfigPaths() dbgPath("cfg dir ", myCfgDir); dbgPath("ssave dir ", mySnapshotSaveDir); dbgPath("sload dir ", mySnapshotLoadDir); + dbgPath("bezel dir ", myBezelDir); dbgPath("cheat file", myCheatFile); dbgPath("pal file ", myPaletteFile); #endif } +#ifdef IMAGE_SUPPORT +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +const FSNode& OSystem::snapshotSaveDir() +{ + const string_view ssSaveDir = mySettings->getString("snapsavedir"); + if(ssSaveDir == EmptyString) + mySnapshotSaveDir = userDir(); + else + mySnapshotSaveDir = FSNode(ssSaveDir); + if(!mySnapshotSaveDir.isDirectory()) + mySnapshotSaveDir.makeDir(); + + return mySnapshotSaveDir; +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +const FSNode& OSystem::snapshotLoadDir() +{ + const string_view ssLoadDir = mySettings->getString("snaploaddir"); + if(ssLoadDir == EmptyString) + mySnapshotLoadDir = userDir(); + else + mySnapshotLoadDir = FSNode(ssLoadDir); + if(!mySnapshotLoadDir.isDirectory()) + mySnapshotLoadDir.makeDir(); + + return mySnapshotLoadDir; +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +const FSNode& OSystem::bezelDir() +{ + const string_view bezelDir = mySettings->getString("bezeldir"); + if(bezelDir == EmptyString) + myBezelDir = userDir(); + else + myBezelDir = FSNode(bezelDir); + if(!myBezelDir.isDirectory()) + myBezelDir.makeDir(); + + return myBezelDir; +} +#endif + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void OSystem::setUserDir(string_view path) { diff --git a/src/emucore/OSystem.hxx b/src/emucore/OSystem.hxx index 5873abe76..f54f59171 100644 --- a/src/emucore/OSystem.hxx +++ b/src/emucore/OSystem.hxx @@ -306,9 +306,9 @@ class OSystem Return the full/complete path name for saving snapshots, loading launcher images and loading bezels. */ - const FSNode& snapshotSaveDir() const { return mySnapshotSaveDir; } - const FSNode& snapshotLoadDir() const { return mySnapshotLoadDir; } - const FSNode& bezelDir() const { return myBezelDir; } + const FSNode& snapshotSaveDir(); + const FSNode& snapshotLoadDir(); + const FSNode& bezelDir(); #endif /** diff --git a/src/gui/UIDialog.cxx b/src/gui/UIDialog.cxx index fd1831574..eec95ec85 100644 --- a/src/gui/UIDialog.cxx +++ b/src/gui/UIDialog.cxx @@ -316,10 +316,10 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent, // Add message concerning usage xpos = HBORDER; ypos = myTab->getHeight() - fontHeight - ifont.getFontHeight() - VGAP - VBORDER; - lwidth = ifont.getStringWidth("(*) Changes require an application restart"); + lwidth = ifont.getStringWidth("(*) Changes may require an application restart"); new StaticTextWidget(myTab, ifont, xpos, ypos, std::min(lwidth, _w - HBORDER * 2), ifont.getFontHeight(), - "(*) Changes require an application restart"); + "(*) Changes may require an application restart"); // Add items for tab 1 addToFocusList(wid, myTab, tabID);