Skip to content

Commit df670df

Browse files
committed
update dosbox-x patches
1 parent ec1166f commit df670df

File tree

2 files changed

+30
-30
lines changed

2 files changed

+30
-30
lines changed
Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git a/src/gui/sdlmain.cpp b/src/gui/sdlmain.cpp
2-
index aedb5d82f..8bfb4642b 100644
2+
index c500868b2..4417f9842 100644
33
--- a/src/gui/sdlmain.cpp
44
+++ b/src/gui/sdlmain.cpp
5-
@@ -830,7 +830,7 @@ const char *modifier;
5+
@@ -931,7 +931,7 @@ const char *modifier;
66
#elif defined(HAIKU)
77
#define DEFAULT_CONFIG_FILE "~/config/settings/dosbox-x/dosbox-x.conf"
88
#else /*linux freebsd*/
@@ -12,33 +12,33 @@ index aedb5d82f..8bfb4642b 100644
1212

1313
#if C_SET_PRIORITY
1414
diff --git a/src/misc/cross.cpp b/src/misc/cross.cpp
15-
index 36e558c8c..8cadd571d 100644
15+
index 2ba476994..b4375352e 100644
1616
--- a/src/misc/cross.cpp
1717
+++ b/src/misc/cross.cpp
18-
@@ -167,7 +167,7 @@ void Cross::GetPlatformConfigDir(std::string& in) {
19-
#elif !defined(HX_DOS)
20-
const char *xdg_conf_home = getenv("XDG_CONFIG_HOME");
21-
const std::string conf_home = xdg_conf_home && xdg_conf_home[0] == '/' ? xdg_conf_home: "~/.config";
22-
- in = conf_home + "/dosbox-x";
23-
+ in = conf_home + "/dosbox";
24-
ResolveHomedir(in);
18+
@@ -194,7 +194,7 @@ std::string Cross::GetPlatformConfigDir()
19+
? xdg_conf_home
20+
: "~/.config";
21+
22+
- dir = conf_home + "/dosbox-x";
23+
+ dir = conf_home + "/dosbox";
24+
ResolveHomedir(dir);
2525
#endif
26-
//LOG_MSG("Config dir: %s", in.c_str());
27-
@@ -180,7 +180,7 @@ void Cross::GetPlatformConfigName(std::string& in) {
28-
#elif defined(MACOSX)
29-
#define DEFAULT_CONFIG_FILE "DOSBox-X " VERSION " Preferences"
30-
#else /*linux freebsd*/
26+
27+
@@ -216,7 +216,7 @@ std::string Cross::GetPlatformConfigName()
28+
#elif defined(OS2) && defined(C_SDL2)
29+
#define DEFAULT_CONFIG_FILE "dosbox-x-" PACKAGE_VERSION ".conf"
30+
#else /* linux, freebsd */
3131
-#define DEFAULT_CONFIG_FILE "dosbox-x-" VERSION ".conf"
3232
+#define DEFAULT_CONFIG_FILE "dosboxx.conf"
3333
#endif
34-
in = DEFAULT_CONFIG_FILE;
35-
}
36-
@@ -204,7 +204,7 @@ void Cross::CreatePlatformConfigDir(std::string& in) {
37-
#elif !defined(HX_DOS)
38-
const char *xdg_conf_home = getenv("XDG_CONFIG_HOME");
39-
const std::string conf_home = xdg_conf_home && xdg_conf_home[0] == '/' ? xdg_conf_home: "~/.config";
40-
- in = conf_home + "/dosbox-x";
41-
+ in = conf_home + "/dosbox";
42-
ResolveHomedir(in);
43-
mkdir(in.c_str(),0700);
34+
35+
name = DEFAULT_CONFIG_FILE;
36+
@@ -250,7 +250,7 @@ std::string Cross::CreatePlatformConfigDir()
37+
const char* xdg_conf_home = getenv("XDG_CONFIG_HOME");
38+
const std::string conf_home =
39+
(xdg_conf_home && xdg_conf_home[0] == '/') ? xdg_conf_home : "~/.config";
40+
- path = conf_home + "/dosbox-x";
41+
+ path = conf_home + "/dosbox";
42+
ResolveHomedir(path);
43+
mkdir(path.c_str(), 0700);
4444
#endif

package/batocera/emulators/dosbox-x/002-map_mouse.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
diff --git a/src/gui/sdl_mapper.cpp b/src/gui/sdl_mapper.cpp
2-
index 1f1ddebbf..fade2789f 100644
2+
index ebe31c9e6..5c0cfd4fa 100644
33
--- a/src/gui/sdl_mapper.cpp
44
+++ b/src/gui/sdl_mapper.cpp
5-
@@ -93,6 +93,7 @@
5+
@@ -94,6 +94,7 @@
66
#define MAX_VJOY_HATS 16
77
#define MAX_VJOY_AXES 8
88

99
+#define MOUSE_OFFSET 8
1010

1111
class CEvent;
1212
class CKeyEvent;
13-
@@ -3045,6 +3046,21 @@ public:
13+
@@ -3063,6 +3064,21 @@ public:
1414
uint8_t button;
1515
};
1616

@@ -32,7 +32,7 @@ index 1f1ddebbf..fade2789f 100644
3232
//! \brief Joystick axis event handling for the mapper
3333
class CJAxisEvent : public CContinuousEvent {
3434
public:
35-
@@ -3917,6 +3933,16 @@ static CMouseButtonEvent * AddMouseButtonEvent(Bitu x,Bitu y,Bitu dx,Bitu dy,cha
35+
@@ -3937,6 +3953,16 @@ static CMouseButtonEvent * AddMouseButtonEvent(Bitu x,Bitu y,Bitu dx,Bitu dy,cha
3636
return event;
3737
}
3838

@@ -49,7 +49,7 @@ index 1f1ddebbf..fade2789f 100644
4949
static CJAxisEvent * AddJAxisButton(Bitu x,Bitu y,Bitu dx,Bitu dy,char const * const title,Bitu stick,Bitu axis,bool positive,CJAxisEvent * opposite_axis) {
5050
char buf[64];
5151
sprintf(buf,"jaxis_%d_%d%s",(int)stick,(int)axis,positive ? "+" : "-");
52-
@@ -4045,6 +4071,16 @@ static void CreateLayout(void) {
52+
@@ -4065,6 +4091,16 @@ static void CreateLayout(void) {
5353

5454
#undef XO
5555
#undef YO

0 commit comments

Comments
 (0)