-
Notifications
You must be signed in to change notification settings - Fork 768
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
emulators/ppsspp: dogfood some improvements in-review
- Use xdg-open to open links and cheat files - Change OS name in compat reports: BSD -> FreeBSD - Minor FakeJit fixes GitHub: hrydgard/native#272, hrydgard/ppsspp#7772
- Loading branch information
Showing
11 changed files
with
175 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
--- Core/MemMap.cpp.orig 2015-02-26 20:05:06 UTC | ||
+++ Core/MemMap.cpp | ||
@@ -194,7 +194,11 @@ static bool Memory_TryBase(u32 flags) { | ||
*view.out_ptr = *views[i - 1].out_ptr; | ||
} else { | ||
*view.out_ptr = (u8*)g_arena.CreateView( | ||
+#ifdef _ARCH_32 | ||
position, view.size, base + (view.virtual_address & MEMVIEW32_MASK)); | ||
+#else | ||
+ position, view.size, base + view.virtual_address); | ||
+#endif | ||
if (!*view.out_ptr) | ||
@@ -185,7 +185,7 @@ static bool Memory_TryBase(u32 flags) { | ||
if (!*view.out_ptr_low) | ||
goto bail; | ||
} | ||
-#ifdef _M_X64 | ||
+#if defined(_ARCH_64) | ||
*view.out_ptr = (u8*)g_arena.CreateView( | ||
position, view.size, base + view.virtual_address); | ||
#else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- Core/Reporting.cpp.orig 2015-02-26 20:05:06 UTC | ||
+++ Core/Reporting.cpp | ||
@@ -189,8 +189,6 @@ namespace Reporting | ||
return "Mac"; | ||
#elif defined(__SYMBIAN32__) | ||
return "Symbian"; | ||
-#elif defined(__FreeBSD__) | ||
- return "BSD"; | ||
#elif defined(BLACKBERRY) | ||
return "Blackberry"; | ||
#elif defined(LOONGSON) | ||
@@ -199,6 +197,16 @@ namespace Reporting | ||
return "Nokia Maemo"; | ||
#elif defined(__linux__) | ||
return "Linux"; | ||
+#elif defined(__Bitrig__) | ||
+ return "Bitrig"; | ||
+#elif defined(__DragonFly__) | ||
+ return "DragonFly"; | ||
+#elif defined(__FreeBSD__) | ||
+ return "FreeBSD"; | ||
+#elif defined(__NetBSD__) | ||
+ return "NetBSD"; | ||
+#elif defined(__OpenBSD__) | ||
+ return "OpenBSD"; | ||
#else | ||
return "Unknown"; | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- UI/CwCheatScreen.cpp.orig 2015-02-26 20:05:06 UTC | ||
+++ UI/CwCheatScreen.cpp | ||
@@ -72,7 +72,7 @@ void CwCheatScreen::CreateViews() { | ||
leftColumn->Add(new Choice(d->T("Back")))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack); | ||
//leftColumn->Add(new Choice(k->T("Add Cheat")))->OnClick.Handle(this, &CwCheatScreen::OnAddCheat); | ||
leftColumn->Add(new Choice(k->T("Import Cheats")))->OnClick.Handle(this, &CwCheatScreen::OnImportCheat); | ||
-#if defined(_WIN32) || defined(__APPLE__) || defined(__linux__) | ||
+#if !defined(MOBILE_DEVICE) | ||
leftColumn->Add(new Choice(k->T("Edit Cheat File")))->OnClick.Handle(this, &CwCheatScreen::OnEditCheatFile); | ||
#endif | ||
leftColumn->Add(new Choice(k->T("Enable/Disable All")))->OnClick.Handle(this, &CwCheatScreen::OnEnableAll); | ||
@@ -179,11 +179,11 @@ UI::EventReturn CwCheatScreen::OnEditChe | ||
if (!retval) { | ||
ERROR_LOG(BOOT, "Failed creating notepad process"); | ||
} | ||
-#elif defined(__APPLE__) || defined(__linux__) | ||
-#if defined(__linux__) | ||
- cheatFile = "xdg-open "; | ||
-#elif defined(__APPLE__) | ||
+#elif !defined(MOBILE_DEVICE) | ||
+#if defined(__APPLE__) | ||
cheatFile = "open "; | ||
+#else | ||
+ cheatFile = "xdg-open "; | ||
#endif | ||
cheatFile.append(activeCheatFile); | ||
NOTICE_LOG(BOOT, "Launching %s", cheatFile.c_str()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- UI/DevScreens.cpp.orig 2015-02-26 20:05:06 UTC | ||
+++ UI/DevScreens.cpp | ||
@@ -612,12 +612,14 @@ void JitCompareScreen::UpdateDisasm() { | ||
|
||
#if defined(ARM) | ||
std::vector<std::string> targetDis = DisassembleArm2(block->normalEntry, block->codeSize); | ||
-#else | ||
+#elif defined(_M_IX86) || defined(_M_X64) | ||
std::vector<std::string> targetDis = DisassembleX86(block->normalEntry, block->codeSize); | ||
#endif | ||
+#if defined(ARM) || defined(_M_IX86) || defined(_M_X64) | ||
for (size_t i = 0; i < targetDis.size(); i++) { | ||
rightDisasm_->Add(new TextView(targetDis[i])); | ||
} | ||
+#endif | ||
|
||
int numMips = leftDisasm_->GetNumSubviews(); | ||
int numHost = rightDisasm_->GetNumSubviews(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
--- native/base/PCMain.cpp.orig 2015-02-23 23:22:58 UTC | ||
+++ native/base/PCMain.cpp | ||
@@ -243,53 +243,53 @@ void System_SendMessage(const char *comm | ||
} | ||
|
||
void LaunchBrowser(const char *url) { | ||
-#ifdef _WIN32 | ||
+#if defined(MOBILE_DEVICE) | ||
+ ILOG("Would have gone to %s but LaunchBrowser is not implemented on this platform", url); | ||
+#elif defined(_WIN32) | ||
ShellExecute(NULL, "open", url, NULL, NULL, SW_SHOWNORMAL); | ||
-#elif __linux__ | ||
+#elif defined(__APPLE__) | ||
+ std::string command = std::string("open ") + url; | ||
+ system(command.c_str()); | ||
+#else | ||
std::string command = std::string("xdg-open ") + url; | ||
int err = system(command.c_str()); | ||
if (err) { | ||
ILOG("Would have gone to %s but xdg-utils seems not to be installed", url) | ||
} | ||
-#elif __APPLE__ | ||
- std::string command = std::string("open ") + url; | ||
- system(command.c_str()); | ||
-#else | ||
- ILOG("Would have gone to %s but LaunchBrowser is not implemented on this platform", url); | ||
#endif | ||
} | ||
|
||
void LaunchMarket(const char *url) { | ||
-#ifdef _WIN32 | ||
+#if defined(MOBILE_DEVICE) | ||
+ ILOG("Would have gone to %s but LaunchMarket is not implemented on this platform", url); | ||
+#elif defined(_WIN32) | ||
ShellExecute(NULL, "open", url, NULL, NULL, SW_SHOWNORMAL); | ||
-#elif __linux__ | ||
+#elif defined(__APPLE__) | ||
+ std::string command = std::string("open ") + url; | ||
+ system(command.c_str()); | ||
+#else | ||
std::string command = std::string("xdg-open ") + url; | ||
int err = system(command.c_str()); | ||
if (err) { | ||
ILOG("Would have gone to %s but xdg-utils seems not to be installed", url) | ||
} | ||
-#elif __APPLE__ | ||
- std::string command = std::string("open ") + url; | ||
- system(command.c_str()); | ||
-#else | ||
- ILOG("Would have gone to %s but LaunchMarket is not implemented on this platform", url); | ||
#endif | ||
} | ||
|
||
void LaunchEmail(const char *email_address) { | ||
-#ifdef _WIN32 | ||
+#if defined(MOBILE_DEVICE) | ||
+ ILOG("Would have opened your email client for %s but LaunchEmail is not implemented on this platform", email_address); | ||
+#elif defined(_WIN32) | ||
ShellExecute(NULL, "open", (std::string("mailto:") + email_address).c_str(), NULL, NULL, SW_SHOWNORMAL); | ||
-#elif __linux__ | ||
+#elif defined(__APPLE__) | ||
+ std::string command = std::string("open mailto:") + email_address; | ||
+ system(command.c_str()); | ||
+#else | ||
std::string command = std::string("xdg-email ") + email_address; | ||
int err = system(command.c_str()); | ||
if (err) { | ||
ILOG("Would have gone to %s but xdg-utils seems not to be installed", email_address) | ||
} | ||
-#elif __APPLE__ | ||
- std::string command = std::string("open mailto:") + email_address; | ||
- system(command.c_str()); | ||
-#else | ||
- ILOG("Would have opened your email client for %s but LaunchEmail is not implemented on this platform", email_address); | ||
#endif | ||
} | ||
|