Fixed build

This commit is contained in:
SSimco
2023-12-23 22:44:10 +02:00
parent fda05a5a00
commit 47091d836b
9 changed files with 46 additions and 46 deletions
-1
View File
@@ -1,5 +1,4 @@
#include <mutex>
#include <gui/helpers/wxHelpers.h>
#include "config/ActiveSettings.h"
#include "util/crypto/aes128.h"
+6 -9
View File
@@ -5,7 +5,6 @@
#include "Cafe/OS/RPL/rpl_structs.h"
#include "boost/algorithm/string.hpp"
#include "gui/helpers/wxHelpers.h"
// error handler
void PatchErrorHandler::printError(class PatchGroup* patchGroup, sint32 lineNumber, std::string_view errorMsg)
{
@@ -38,13 +37,13 @@ void PatchErrorHandler::printError(class PatchGroup* patchGroup, sint32 lineNumb
void PatchErrorHandler::showStageErrorMessageBox()
{
wxString errorMsg;
std::string errorMsg;
if (m_gp)
{
if (m_stage == STAGE::PARSER)
errorMsg.assign(formatWxString(_("Failed to load patches for graphic pack \'{}\'"), m_gp->GetName()));
errorMsg = fmt::format("Failed to load patches for graphic pack \'{}\'", m_gp->GetName());
else
errorMsg.assign(formatWxString(_("Failed to apply patches for graphic pack \'{}\'"), m_gp->GetName()));
errorMsg = fmt::format("Failed to apply patches for graphic pack \'{}\'", m_gp->GetName());
}
else
{
@@ -52,13 +51,11 @@ void PatchErrorHandler::showStageErrorMessageBox()
}
if (cemuLog_isLoggingEnabled(LogType::Patches))
{
errorMsg.append("\n \n")
.append(_("Details:"))
.append("\n");
errorMsg += "\n\nDetails:\n";
for (auto& itr : errorMessages)
{
errorMsg.append(itr);
errorMsg.append("\n");
errorMsg += itr;
errorMsg += "\n";
}
}
cemuLog_log(LogType::Force, "Graphic pack error: {}", errorMsg);
+1 -1
View File
@@ -1,9 +1,9 @@
#include "Debugger.h"
#include "Cafe/OS/RPL/rpl_structs.h"
#include "Cafe/OS/RPL/rpl.h"
#include "Cemu/PPCAssembler/ppcAssembler.h"
#include "Cafe/HW/Espresso/Recompiler/PPCRecompiler.h"
#include "Cemu/ExpressionParser/ExpressionParser.h"
#include "Cafe/OS/libs/coreinit/coreinit.h"
#if BOOST_OS_WINDOWS
@@ -375,7 +375,7 @@ bool DownloadManager::syncAccountTickets()
for (auto& tiv : resultTicketIds.tivs)
{
index++;
std::string msg = _("Downloading account ticket");
std::string msg = "Downloading account ticket";
msg.append(fmt::format(" {0}/{1}", index, count));
setStatusMessage(msg, DLMGR_STATUS_CODE::CONNECTING);
// skip if already cached
@@ -428,7 +428,7 @@ bool DownloadManager::syncAccountTickets()
bool DownloadManager::syncSystemTitleTickets()
{
setStatusMessage(_("Downloading system tickets...").utf8_string(), DLMGR_STATUS_CODE::CONNECTING);
setStatusMessage("Downloading system tickets...", DLMGR_STATUS_CODE::CONNECTING);
// todo - add GetAuth() function
NAPI::AuthInfo authInfo;
authInfo.accountId = m_authInfo.nnidAccountName;
@@ -490,7 +490,7 @@ bool DownloadManager::syncSystemTitleTickets()
// build list of updates for which either an installed game exists or the base title ticket is cached
bool DownloadManager::syncUpdateTickets()
{
setStatusMessage(_("Retrieving update information...").utf8_string(), DLMGR_STATUS_CODE::CONNECTING);
setStatusMessage("Retrieving update information...", DLMGR_STATUS_CODE::CONNECTING);
// download update version list
downloadTitleVersionList();
if (!m_hasTitleVersionList)
@@ -512,7 +512,7 @@ bool DownloadManager::syncUpdateTickets()
if (titleIdParser.GetType() != TitleIdParser::TITLE_TYPE::BASE_TITLE_UPDATE)
continue;
std::string msg = _("Downloading ticket");
std::string msg = "Downloading ticket";
msg.append(fmt::format(" {0}/{1}", updateIndex, numUpdates));
updateIndex++;
setStatusMessage(msg, DLMGR_STATUS_CODE::CONNECTING);
@@ -565,12 +565,12 @@ bool DownloadManager::syncTicketCache()
for (auto& ticketInfo : m_ticketCache)
{
index++;
std::string msg = _("Downloading meta data");
std::string msg = "Downloading meta data";
msg.append(fmt::format(" {0}/{1}", index, count));
setStatusMessage(msg, DLMGR_STATUS_CODE::CONNECTING);
prepareIDBE(ticketInfo.titleId);
}
setStatusMessage(_("Connected. Right click entries in the list to start downloading").utf8_string(), DLMGR_STATUS_CODE::CONNECTED);
setStatusMessage("Connected. Right click entries in the list to start downloading", DLMGR_STATUS_CODE::CONNECTED);
return true;
}
@@ -656,7 +656,7 @@ void DownloadManager::_handle_connect()
// reset login state
m_iasToken.serviceAccountId.clear();
m_iasToken.deviceToken.clear();
setStatusMessage(_("Logging in...").utf8_string(), DLMGR_STATUS_CODE::CONNECTING);
setStatusMessage("Logging in...", DLMGR_STATUS_CODE::CONNECTING);
// retrieve ECS AccountId + DeviceToken from cache
if (s_nupFileCache)
{
@@ -679,7 +679,7 @@ void DownloadManager::_handle_connect()
cemuLog_log(LogType::Force, "Failed to request IAS token");
cemu_assert_debug(false);
m_connectState.store(CONNECT_STATE::FAILED);
setStatusMessage(_("Login failed. Outdated or incomplete online files?").utf8_string(), DLMGR_STATUS_CODE::FAILED);
setStatusMessage("Login failed. Outdated or incomplete online files?", DLMGR_STATUS_CODE::FAILED);
return;
}
}
@@ -687,16 +687,16 @@ void DownloadManager::_handle_connect()
if (!_connect_queryAccountStatusAndServiceURLs())
{
m_connectState.store(CONNECT_STATE::FAILED);
setStatusMessage(_("Failed to query account status. Invalid account information?").utf8_string(), DLMGR_STATUS_CODE::FAILED);
setStatusMessage("Failed to query account status. Invalid account information?", DLMGR_STATUS_CODE::FAILED);
return;
}
// load ticket cache and sync
setStatusMessage(_("Updating ticket cache").utf8_string(), DLMGR_STATUS_CODE::CONNECTING);
setStatusMessage("Updating ticket cache", DLMGR_STATUS_CODE::CONNECTING);
loadTicketCache();
if (!syncTicketCache())
{
m_connectState.store(CONNECT_STATE::FAILED);
setStatusMessage(_("Failed to request tickets (invalid NNID?)").utf8_string(), DLMGR_STATUS_CODE::FAILED);
setStatusMessage("Failed to request tickets (invalid NNID?)", DLMGR_STATUS_CODE::FAILED);
return;
}
searchForIncompleteDownloads();
@@ -720,7 +720,7 @@ void DownloadManager::connect(
if (nnidAccountName.empty())
{
m_connectState.store(CONNECT_STATE::FAILED);
setStatusMessage(_("This account is not linked with an NNID").utf8_string(), DLMGR_STATUS_CODE::FAILED);
setStatusMessage("This account is not linked with an NNID", DLMGR_STATUS_CODE::FAILED);
return;
}
runManager();
@@ -730,7 +730,7 @@ void DownloadManager::connect(
{
cemuLog_log(LogType::Force, "DLMgr: Invalid password hash");
m_connectState.store(CONNECT_STATE::FAILED);
setStatusMessage(_("Failed. Account does not have password set").utf8_string(), DLMGR_STATUS_CODE::FAILED);
setStatusMessage("Failed. Account does not have password set", DLMGR_STATUS_CODE::FAILED);
return;
}
m_authInfo.region = region;
@@ -1058,7 +1058,7 @@ void DownloadManager::asyncPackageDownloadTMD(Package* package)
std::unique_lock<std::recursive_mutex> _l(m_mutex);
if (!tmdResult.isValid)
{
setPackageError(package, _("TMD download failed").utf8_string());
setPackageError(package, "TMD download failed");
package->state.isDownloadingTMD = false;
return;
}
@@ -1067,7 +1067,7 @@ void DownloadManager::asyncPackageDownloadTMD(Package* package)
NCrypto::TMDParser tmdParser;
if (!tmdParser.parse(tmdResult.tmdData.data(), tmdResult.tmdData.size()))
{
setPackageError(package, _("Invalid TMD").utf8_string());
setPackageError(package, "Invalid TMD");
package->state.isDownloadingTMD = false;
return;
}
@@ -1176,7 +1176,7 @@ void DownloadManager::asyncPackageDownloadContentFile(Package* package, uint16 i
size_t bytesWritten = callbackInfo->receiveBuffer.size();
if (callbackInfo->fileOutput->writeData(callbackInfo->receiveBuffer.data(), callbackInfo->receiveBuffer.size()) != (uint32)callbackInfo->receiveBuffer.size())
{
callbackInfo->downloadMgr->setPackageError(callbackInfo->package, _("Cannot write file. Disk full?").utf8_string());
callbackInfo->downloadMgr->setPackageError(callbackInfo->package, "Cannot write file. Disk full?");
return false;
}
callbackInfo->receiveBuffer.clear();
@@ -1197,12 +1197,12 @@ void DownloadManager::asyncPackageDownloadContentFile(Package* package, uint16 i
callbackInfoData.fileOutput = FileStream::createFile2(packageDownloadPath / fmt::format("{:08x}.app", contentId));
if (!callbackInfoData.fileOutput)
{
setPackageError(package, _("Cannot create file").utf8_string());
setPackageError(package, "Cannot create file");
return;
}
if (!NAPI::CCS_GetContentFile(titleId, contentId, CallbackInfo::writeCallback, &callbackInfoData))
{
setPackageError(package, _("Download failed").utf8_string());
setPackageError(package, "Download failed");
delete callbackInfoData.fileOutput;
return;
}
+2 -1
View File
@@ -46,7 +46,8 @@ android {
'-DENABLE_OPENGL=OFF',
'-DBUNDLE_SPEEX=ON',
'-DENABLE_DISCORD_RPC=OFF',
'-DENABLE_WAYLAND=OFF'
'-DENABLE_NSYSHID_LIBUSB=OFF',
'-DENABLE_WAYLAND=OFF',
)
// abiFilters("x86_64", "arm64-v8a")
abiFilters("arm64-v8a")
+9 -10
View File
@@ -5,7 +5,6 @@
#include "util/math/vector2.h"
#include "Cafe/Account/Account.h"
#include <wx/intl.h>
struct GameEntry
{
GameEntry() = default;
@@ -257,15 +256,15 @@ struct fmt::formatter<CafeConsoleRegion> : formatter<string_view> {
string_view name;
switch (v)
{
case CafeConsoleRegion::JPN: name = wxTRANSLATE("Japan"); break;
case CafeConsoleRegion::USA: name = wxTRANSLATE("USA"); break;
case CafeConsoleRegion::EUR: name = wxTRANSLATE("Europe"); break;
case CafeConsoleRegion::AUS_DEPR: name = wxTRANSLATE("Australia"); break;
case CafeConsoleRegion::CHN: name = wxTRANSLATE("China"); break;
case CafeConsoleRegion::KOR: name = wxTRANSLATE("Korea"); break;
case CafeConsoleRegion::TWN: name = wxTRANSLATE("Taiwan"); break;
case CafeConsoleRegion::Auto: name = wxTRANSLATE("Auto"); break;
default: name = wxTRANSLATE("many"); break;
case CafeConsoleRegion::JPN: name = "Japan"; break;
case CafeConsoleRegion::USA: name = "USA"; break;
case CafeConsoleRegion::EUR: name = "Europe"; break;
case CafeConsoleRegion::AUS_DEPR: name = "Australia"; break;
case CafeConsoleRegion::CHN: name = "China"; break;
case CafeConsoleRegion::KOR: name = "Korea"; break;
case CafeConsoleRegion::TWN: name = "Taiwan"; break;
case CafeConsoleRegion::Auto: name = "Auto"; break;
default: name = "many"; break;
}
return formatter<string_view>::format(name, ctx);
+5 -4
View File
@@ -151,7 +151,7 @@ target_link_libraries(CemuGui PRIVATE
ZArchive::zarchive
)
if(UNIX AND NOT APPLE)
if(ENABLE_WXWIDGETS AND UNIX AND NOT APPLE)
target_link_libraries(CemuGui PRIVATE GTK3::gtk)
if (ENABLE_WAYLAND)
target_link_libraries(CemuGui PRIVATE Wayland::Client CemuWaylandProtocols)
@@ -167,10 +167,11 @@ if(UNIX AND NOT APPLE)
target_link_libraries(CemuGui PRIVATE gamemode)
endif()
endif()
# PUBLIC because wx/app.h is included in CemuApp.h
target_link_libraries(CemuGui PUBLIC wx::base wx::core wx::gl wx::propgrid wx::xrc)
if (ENABLE_WXWIDGETS)
# PUBLIC because wx/app.h is included in CemuApp.h
target_link_libraries(CemuGui PUBLIC wx::base wx::core wx::gl wx::propgrid wx::xrc)
endif()
if(WIN32)
target_link_libraries(CemuGui PRIVATE bthprops)
endif()
+1 -1
View File
@@ -26,7 +26,7 @@ void InputPanel::on_timer(const EmulatedControllerPtr& emulated_controller, cons
const auto mapping = reinterpret_cast<uint64>(element->GetClientData());
// reset mapping
if(std::exchange(m_right_down, false) || gui_isKeyDown(PlatformKeyCodes::ESCAPE))
if(std::exchange(m_right_down, false))
{
element->SetBackgroundColour(kKeyColourNormalMode);
m_color_backup[element->GetId()] = kKeyColourNormalMode;
+4 -1
View File
@@ -60,6 +60,9 @@
"default-features": false,
"features": [ "openssl" ]
},
"libusb"
{
"name": "libusb",
"platform": "!android"
}
]
}