Please help testing upcoming openMSX release!

Page 55/61
48 | 49 | 50 | 51 | 52 | 53 | 54 | | 56 | 57 | 58 | 59 | 60

By Daemos

Paragon (1951)

Daemos's picture

28-03-2021, 11:36

Quote:

Which version of SDL2 are you using Daemos?

SDL2: version 2.0.12

By Manuel

Ascended (18082)

Manuel's picture

28-03-2021, 12:52

Me too. Still, no issues here. I don't know what's the difference.

By Manuel

Ascended (18082)

Manuel's picture

28-03-2021, 21:20

SjaaQ wrote:

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?

By Manuel

Ascended (18082)

Manuel's picture

28-03-2021, 22:03

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?

By Daemos

Paragon (1951)

Daemos's picture

28-03-2021, 22:55

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.

By Manuel

Ascended (18082)

Manuel's picture

28-03-2021, 23:18

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.

By dean1956

Supporter (1)

dean1956's picture

29-03-2021, 00:00

msx rules

By SjaaQ

Master (215)

SjaaQ's picture

29-03-2021, 08:32

Manuel wrote:

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?

By SjaaQ

Master (215)

SjaaQ's picture

29-03-2021, 08:50

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).

By Manuel

Ascended (18082)

Manuel's picture

29-03-2021, 20:20

I just pushed the final version. Please verify with the next development build. Thanks Smile

Page 55/61
48 | 49 | 50 | 51 | 52 | 53 | 54 | | 56 | 57 | 58 | 59 | 60