From ea000eabf27f750a5d1316ea3e1bf16607e85c36 Mon Sep 17 00:00:00 2001 From: Christian Speckner Date: Wed, 6 Jan 2021 17:21:20 +0100 Subject: [PATCH 1/4] Disable defunct joymap for the R77. --- src/unix/r77/SettingsR77.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/unix/r77/SettingsR77.cxx b/src/unix/r77/SettingsR77.cxx index 02c80aaf3..7af1a0f85 100644 --- a/src/unix/r77/SettingsR77.cxx +++ b/src/unix/r77/SettingsR77.cxx @@ -76,9 +76,11 @@ SettingsR77::SettingsR77() setPermanent("dejitter.base", "2"); setPermanent("dejitter.diff", "6"); + /* setPermanent("joymap", string() + "128^i2c_controller|4 17 18 15 16 31 31 35 35 121 122 112 113 0 0 0 0|8 19 20 100 99 103 0 0 0 120 123 127 126 0 124 0 0|" + "0^i2c_controller #2|4 24 25 22 23 39 39 43 43 121 122 112 113 0 0 0 0|8 26 27 100 99 103 110 0 0 120 123 127 126 0 124 0 0|0" ); + */ } From 5fe20f075f03d218420ee7f9675a37c08a2faf48 Mon Sep 17 00:00:00 2001 From: Christian Speckner Date: Wed, 6 Jan 2021 21:12:11 +0100 Subject: [PATCH 2/4] Attempt at fixing R77 crash. --- src/common/repository/sqlite/StellaDb.cxx | 1 + src/unix/r77/OSystemR77.cxx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/repository/sqlite/StellaDb.cxx b/src/common/repository/sqlite/StellaDb.cxx index bb4317b87..bcc33fff4 100644 --- a/src/common/repository/sqlite/StellaDb.cxx +++ b/src/common/repository/sqlite/StellaDb.cxx @@ -77,6 +77,7 @@ void StellaDb::initialize() mySettingsRepository = make_unique(); myPropertyRepository = make_unique(); + myHighscoreRepository = make_unique(); myDb.reset(); myPropertyRepositoryHost.reset(); diff --git a/src/unix/r77/OSystemR77.cxx b/src/unix/r77/OSystemR77.cxx index 112821c37..350b3247f 100644 --- a/src/unix/r77/OSystemR77.cxx +++ b/src/unix/r77/OSystemR77.cxx @@ -21,5 +21,5 @@ void OSystemR77::getBaseDirectories(string& basedir, string& homeDir, bool, const string&) { - basedir = homeDir = "/mnt/stella"; + basedir = homeDir = "/mnt/stella/"; } From 8ec309f4f8b734ac93318a0196b36991332a93da Mon Sep 17 00:00:00 2001 From: Christian Speckner Date: Wed, 6 Jan 2021 21:51:53 +0100 Subject: [PATCH 3/4] Fix crash with minimal launcher UI. --- src/gui/LauncherDialog.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/LauncherDialog.cxx b/src/gui/LauncherDialog.cxx index 4daa4a42d..b3f00dfab 100644 --- a/src/gui/LauncherDialog.cxx +++ b/src/gui/LauncherDialog.cxx @@ -410,7 +410,8 @@ void LauncherDialog::loadConfig() // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void LauncherDialog::saveConfig() { - instance().settings().setValue("launchersubdirs", mySubDirs->getState()); + if (mySubDirs) + instance().settings().setValue("launchersubdirs", mySubDirs->getState()); if(instance().settings().getBool("followlauncher")) instance().settings().setValue("romdir", myList->currentDir().getShortPath()); } From 43f9f562b1655e6689857168a4a41ca30f581e27 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Thu, 7 Jan 2021 22:28:35 -0330 Subject: [PATCH 4/4] Fix for suggestion from clang-tidy. --- src/common/bspf.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/bspf.hxx b/src/common/bspf.hxx index 9a6afca1f..7435eb843 100644 --- a/src/common/bspf.hxx +++ b/src/common/bspf.hxx @@ -244,7 +244,7 @@ namespace BSPF // starting from 'startpos' in the first string static size_t findIgnoreCase(string_view s1, string_view s2, size_t startpos = 0) { - auto pos = std::search(s1.cbegin()+startpos, s1.cend(), + const auto* pos = std::search(s1.cbegin()+startpos, s1.cend(), s2.cbegin(), s2.cend(), [](char ch1, char ch2) { return toupper(uInt8(ch1)) == toupper(uInt8(ch2)); });