Which version of SDL2 are you using Daemos?
SDL2: version 2.0.12
Me too. Still, no issues here. I don't know what's the difference.
I have introduced an environment variable in my build "OPENMSX_HOME". If this is not set, it uses a "home" folder in the currrent directory.
... static const string OPENMSX_DIR = expandTilde(getHomeDir()); ... const string& getHomeDir() { static std::optional result; if (!result) { const char* const NAME = "OPENMSX_HOME"; char* value = getenv(NAME); result = value ? value : "./home"; } return *result; }
Although I get the idea here, can you send me the full file or even better, as a patch?
I made a quick and dirty similar patch (which still needs some cleaning up):
diff --git a/src/file/FileOperations.cc b/src/file/FileOperations.cc index 182acd13b..fd7c04838 100644 --- a/src/file/FileOperations.cc +++ b/src/file/FileOperations.cc @@ -428,7 +428,8 @@ const string& getUserOpenMSXDir() #else static const string OPENMSX_DIR = expandTilde("~/.openMSX"); #endif - return OPENMSX_DIR; + static const string OPENMSX_HOME = string(getenv("OPENMSX_HOME") ? getenv("OPENMSX_HOME") : ""); + return OPENMSX_HOME.empty() ? OPENMSX_DIR : OPENMSX_HOME; } const string& getUserDataDir()
Does that work for you?
the quick hack mentioned earlier does the trick. Forcing the compositor to never stop. Workaround is just fine. No screen flashes any more and no fubarisation of the windows. Its a KDE5 bug so it seems.
Ah, I'm using GNOME, so that is a difference which explains the issue. Anyways, glad you found a way around it. If you know about other openMSX bugs that are not in our bug tracker, please let us know. We're planning to make a release very soon.
msx rules
I made a quick and dirty similar patch (which still needs some cleaning up):
diff --git a/src/file/FileOperations.cc b/src/file/FileOperations.cc index 182acd13b..fd7c04838 100644 --- a/src/file/FileOperations.cc +++ b/src/file/FileOperations.cc @@ -428,7 +428,8 @@ const string& getUserOpenMSXDir() #else static const string OPENMSX_DIR = expandTilde("~/.openMSX"); #endif - return OPENMSX_DIR; + static const string OPENMSX_HOME = string(getenv("OPENMSX_HOME") ? getenv("OPENMSX_HOME") : ""); + return OPENMSX_HOME.empty() ? OPENMSX_DIR : OPENMSX_HOME; } const string& getUserDataDir()
Does that work for you?
I don't know how to apply that patch (or build one). Like I said, first time ever to modify and compile a project in Visual Studio. Any links to instructions for that?
Also, the .hh file also needs to be modified.
I have changed my local version to use ~/openMSX again if the environment variable is not set. Using ./home will make it incompatible with the previous version. As far as I can read the patch file, you did the same, right?
Never mind, I have figured out how to apply the patch (in linux). After patching I copied everything back to Visual Studio and recompiled.This change works perfectly on my machine.
If have tested with and without the environment setting. Without it goes back to the Documents folder (in my case in OneDrive), with it just uses the specified directory. I used a full path in the variable (so no relative one).
I just pushed the final version. Please verify with the next development build. Thanks