aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CP15.cpp1
-rw-r--r--src/libui_sdl/main.cpp8
2 files changed, 7 insertions, 2 deletions
diff --git a/src/CP15.cpp b/src/CP15.cpp
index fb0da0d..8661364 100644
--- a/src/CP15.cpp
+++ b/src/CP15.cpp
@@ -27,7 +27,6 @@
// this was measured to be close to hardware average
// a value of 1 would represent a perfect cache, but that causes
// games to run too fast, causing a number of issues
-// code cache timing can get as low as 3
const int kDataCacheTiming = 2;
const int kCodeCacheTiming = 5;
diff --git a/src/libui_sdl/main.cpp b/src/libui_sdl/main.cpp
index ee6b80d..4f0d278 100644
--- a/src/libui_sdl/main.cpp
+++ b/src/libui_sdl/main.cpp
@@ -1315,7 +1315,7 @@ void OnOpenFile(uiMenuItem* item, uiWindow* window, void* blarg)
EmuRunning = prevstatus;
return;
}
-
+
int pos = strlen(file)-1;
while (file[pos] != '/' && file[pos] != '\\' && pos > 0) pos--;
strncpy(Config::LastROMFolder, file, pos);
@@ -1566,6 +1566,7 @@ int main(int argc, char** argv)
printf("melonDS " MELONDS_VERSION "\n");
printf(MELONDS_URL "\n");
+ if (argc > 0 && strlen(argv[0]) > 0)
{
int len = strlen(argv[0]);
while (len > 0)
@@ -1578,6 +1579,11 @@ int main(int argc, char** argv)
strncpy(EmuDirectory, argv[0], len);
EmuDirectory[len] = '\0';
}
+ else
+ {
+ EmuDirectory = new char[2];
+ strcpy(EmuDirectory, ".");
+ }
// http://stackoverflow.com/questions/14543333/joystick-wont-work-using-sdl
SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1");