mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:17:34 +00:00
Ports: Don't crash when starting uMario outside of /opt/Super_Mario
Previously this port would just crash. There was a workaround in the way the app launcher started the game but I'd really like to get rid of that hack.
This commit is contained in:
parent
19c4e74f70
commit
8c18c7e4c2
1 changed files with 21 additions and 0 deletions
21
Ports/Super-Mario/patches/cwd.patch
Normal file
21
Ports/Super-Mario/patches/cwd.patch
Normal file
|
@ -0,0 +1,21 @@
|
|||
diff -Naur Super-Mario-Clone-Cpp-master/src/main.cpp Super-Mario-Clone-Cpp-master.serenity/src/main.cpp
|
||||
--- Super-Mario-Clone-Cpp-master/src/main.cpp 2019-08-01 15:39:15.000000000 +0200
|
||||
+++ Super-Mario-Clone-Cpp-master.serenity/src/main.cpp 2021-06-03 23:54:26.881221759 +0200
|
||||
@@ -1,10 +1,15 @@
|
||||
#include "header.h"
|
||||
#include "Core.h"
|
||||
+#include <unistd.h>
|
||||
|
||||
int main(int argc, const char* argv[]) {
|
||||
- CCore oCore;
|
||||
+ chdir("/opt/Super_Mario");
|
||||
|
||||
- oCore.mainLoop();
|
||||
+ {
|
||||
+ CCore oCore;
|
||||
+
|
||||
+ oCore.mainLoop();
|
||||
+ }
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue