Merge pull request #17184 from hrydgard/additional-host-cleanup
Additional Host cleanup
This commit is contained in:
commit
659b51e55a
70 changed files with 123 additions and 391 deletions
|
@ -1213,8 +1213,6 @@ elseif(USING_QT_UI)
|
|||
list(APPEND NativeAppSource
|
||||
Qt/QtMain.cpp
|
||||
Qt/QtMain.h
|
||||
Qt/QtHost.cpp
|
||||
Qt/QtHost.h
|
||||
Qt/mainwindow.cpp
|
||||
Qt/mainwindow.h
|
||||
)
|
||||
|
|
|
@ -204,6 +204,10 @@ bool System_AudioRecordingState();
|
|||
// This will be changed to take an enum. Currently simply implemented by forwarding to NativeMessageReceived.
|
||||
void System_PostUIMessage(const std::string &message, const std::string ¶m);
|
||||
|
||||
// Shows a visible message to the user.
|
||||
// The default implementation in NativeApp.cpp uses our "osm" system (on screen messaging).
|
||||
void System_NotifyUserMessage(const std::string &message, float duration = 1.0f, uint32_t color = 0x00FFFFFF, const char *id = nullptr);
|
||||
|
||||
// For these functions, most platforms will use the implementation provided in UI/AudioCommon.cpp,
|
||||
// no need to implement separately.
|
||||
void System_AudioGetDebugStats(char *buf, size_t bufSize);
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include "Common/Log.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/MemMap.h"
|
||||
#include "Core/SaveState.h"
|
||||
#include "Core/System.h"
|
||||
|
|
|
@ -2,16 +2,17 @@
|
|||
#include <cctype>
|
||||
#include <cstdint>
|
||||
#include <cstdio>
|
||||
|
||||
#include "Common/Data/Text/I18n.h"
|
||||
#include "Common/StringUtils.h"
|
||||
#include "Common/Serialize/Serializer.h"
|
||||
#include "Common/Serialize/SerializeFuncs.h"
|
||||
#include "Common/System/System.h"
|
||||
#include "Common/File/FileUtil.h"
|
||||
#include "Core/CoreTiming.h"
|
||||
#include "Core/CoreParameter.h"
|
||||
#include "Core/CwCheat.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/MemMapHelpers.h"
|
||||
#include "Core/MIPS/MIPS.h"
|
||||
#include "Core/ELF/ParamSFO.h"
|
||||
|
@ -377,7 +378,7 @@ void CWCheatEngine::CreateCheatFile() {
|
|||
}
|
||||
if (!File::Exists(filename_)) {
|
||||
auto err = GetI18NCategory("Error");
|
||||
host->NotifyUserMessage(err->T("Unable to create cheat file, disk may be full"));
|
||||
System_NotifyUserMessage(err->T("Unable to create cheat file, disk may be full"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include "Core/Debugger/Breakpoints.h"
|
||||
#include "Core/Debugger/MemBlockInfo.h"
|
||||
#include "Core/Debugger/SymbolMap.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/MemMap.h"
|
||||
#include "Core/MIPS/MIPSAnalyst.h"
|
||||
#include "Core/MIPS/MIPSDebugInterface.h"
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include "Core/Debugger/WebSocket/GameSubscriber.h"
|
||||
#include "Core/Debugger/WebSocket/WebSocketUtils.h"
|
||||
#include "Core/ELF/ParamSFO.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/System.h"
|
||||
|
||||
DebuggerSubscriber *WebSocketGameInit(DebuggerEventHandlerMap &map) {
|
||||
|
|
|
@ -22,9 +22,9 @@
|
|||
#include "Common/Data/Format/ZIMLoad.h"
|
||||
#include "Common/Serialize/Serializer.h"
|
||||
#include "Common/Serialize/SerializeFuncs.h"
|
||||
#include "Common/System/System.h"
|
||||
#include "Common/StringUtils.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/Reporting.h"
|
||||
#include "Core/System.h"
|
||||
#include "Core/Debugger/MemBlockInfo.h"
|
||||
|
@ -456,7 +456,7 @@ int SavedataParam::Save(SceUtilitySavedataParam* param, const std::string &saveD
|
|||
if (!pspFileSystem.GetFileInfo(dirPath).exists) {
|
||||
if (!pspFileSystem.MkDir(dirPath)) {
|
||||
auto err = GetI18NCategory("Error");
|
||||
host->NotifyUserMessage(err->T("Unable to write savedata, disk may be full"));
|
||||
System_NotifyUserMessage(err->T("Unable to write savedata, disk may be full"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -485,7 +485,7 @@ int SavedataParam::Save(SceUtilitySavedataParam* param, const std::string &saveD
|
|||
|
||||
if (EncryptData(decryptMode, cryptedData, &cryptedSize, &aligned_len, cryptedHash, (hasKey ? param->key : 0)) != 0) {
|
||||
auto err = GetI18NCategory("Error");
|
||||
host->NotifyUserMessage(err->T("Save encryption failed. This save won't work on real PSP"), 6.0f);
|
||||
System_NotifyUserMessage(err->T("Save encryption failed. This save won't work on real PSP"), 6.0f);
|
||||
ERROR_LOG(SCEUTILITY,"Save encryption failed. This save won't work on real PSP");
|
||||
delete[] cryptedData;
|
||||
cryptedData = 0;
|
||||
|
@ -775,8 +775,8 @@ u32 SavedataParam::LoadCryptedSave(SceUtilitySavedataParam *param, u8 *data, con
|
|||
// Don't notify the user if we're not going to upgrade the save.
|
||||
if (!g_Config.bEncryptSave) {
|
||||
auto di = GetI18NCategory("Dialog");
|
||||
host->NotifyUserMessage(di->T("When you save, it will load on a PSP, but not an older PPSSPP"), 6.0f);
|
||||
host->NotifyUserMessage(di->T("Old savedata detected"), 6.0f);
|
||||
System_NotifyUserMessage(di->T("When you save, it will load on a PSP, but not an older PPSSPP"), 6.0f);
|
||||
System_NotifyUserMessage(di->T("Old savedata detected"), 6.0f);
|
||||
}
|
||||
} else {
|
||||
if (decryptMode == 5 && prevCryptMode == 3) {
|
||||
|
@ -787,8 +787,8 @@ u32 SavedataParam::LoadCryptedSave(SceUtilitySavedataParam *param, u8 *data, con
|
|||
if (g_Config.bSavedataUpgrade) {
|
||||
decryptMode = prevCryptMode;
|
||||
auto di = GetI18NCategory("Dialog");
|
||||
host->NotifyUserMessage(di->T("When you save, it will not work on outdated PSP Firmware anymore"), 6.0f);
|
||||
host->NotifyUserMessage(di->T("Old savedata detected"), 6.0f);
|
||||
System_NotifyUserMessage(di->T("When you save, it will not work on outdated PSP Firmware anymore"), 6.0f);
|
||||
System_NotifyUserMessage(di->T("Old savedata detected"), 6.0f);
|
||||
}
|
||||
}
|
||||
hasKey = decryptMode > 1;
|
||||
|
|
|
@ -21,10 +21,10 @@
|
|||
|
||||
#include "Common/Data/Text/I18n.h"
|
||||
#include "Common/File/FileUtil.h"
|
||||
#include "Common/System/System.h"
|
||||
#include "Common/Log.h"
|
||||
#include "Common/Swap.h"
|
||||
#include "Core/Loaders.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/FileSystems/BlockDevices.h"
|
||||
|
||||
extern "C"
|
||||
|
@ -73,7 +73,7 @@ u32 BlockDevice::CalculateCRC(volatile bool *cancel) {
|
|||
void BlockDevice::NotifyReadError() {
|
||||
auto err = GetI18NCategory("Error");
|
||||
if (!reportedError_) {
|
||||
host->NotifyUserMessage(err->T("Game disc read error - ISO corrupt"), 6.0f);
|
||||
System_NotifyUserMessage(err->T("Game disc read error - ISO corrupt"), 6.0f);
|
||||
reportedError_ = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include "Common/Serialize/Serializer.h"
|
||||
#include "Common/Serialize/SerializeFuncs.h"
|
||||
#include "Common/StringUtils.h"
|
||||
#include "Common/System/System.h"
|
||||
#include "Common/File/FileUtil.h"
|
||||
#include "Common/File/DiskFree.h"
|
||||
#include "Common/File/VFS/VFS.h"
|
||||
|
@ -43,7 +44,6 @@
|
|||
#include "Core/HW/MemoryStick.h"
|
||||
#include "Core/CoreTiming.h"
|
||||
#include "Core/System.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/Replay.h"
|
||||
#include "Core/Reporting.h"
|
||||
|
||||
|
@ -191,7 +191,7 @@ bool DirectoryFileHandle::Open(const Path &basePath, std::string &fileName, File
|
|||
if (w32err == ERROR_DISK_FULL || w32err == ERROR_NOT_ENOUGH_QUOTA) {
|
||||
// This is returned when the disk is full.
|
||||
auto err = GetI18NCategory("Error");
|
||||
host->NotifyUserMessage(err->T("Disk full while writing data"));
|
||||
System_NotifyUserMessage(err->T("Disk full while writing data"));
|
||||
error = SCE_KERNEL_ERROR_ERRNO_NO_PERM;
|
||||
} else if (!success) {
|
||||
error = SCE_KERNEL_ERROR_ERRNO_FILE_NOT_FOUND;
|
||||
|
@ -289,7 +289,7 @@ bool DirectoryFileHandle::Open(const Path &basePath, std::string &fileName, File
|
|||
} else if (errno == ENOSPC) {
|
||||
// This is returned when the disk is full.
|
||||
auto err = GetI18NCategory("Error");
|
||||
host->NotifyUserMessage(err->T("Disk full while writing data"));
|
||||
System_NotifyUserMessage(err->T("Disk full while writing data"));
|
||||
error = SCE_KERNEL_ERROR_ERRNO_NO_PERM;
|
||||
} else {
|
||||
error = SCE_KERNEL_ERROR_ERRNO_FILE_NOT_FOUND;
|
||||
|
@ -364,7 +364,7 @@ size_t DirectoryFileHandle::Write(const u8* pointer, s64 size)
|
|||
if (diskFull) {
|
||||
ERROR_LOG(FILESYS, "Disk full");
|
||||
auto err = GetI18NCategory("Error");
|
||||
host->NotifyUserMessage(err->T("Disk full while writing data"));
|
||||
System_NotifyUserMessage(err->T("Disk full while writing data"));
|
||||
// We only return an error when the disk is actually full.
|
||||
// When writing this would cause the disk to be full, so it wasn't written, we return 0.
|
||||
if (MemoryStick_FreeSpace() == 0) {
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include "Core/Config.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/CoreTiming.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/MemMapHelpers.h"
|
||||
#include "Core/Reporting.h"
|
||||
#include "Core/System.h"
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
|
||||
#include "Core/Config.h"
|
||||
#include "Core/CoreTiming.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/MemMapHelpers.h"
|
||||
#include "Core/Reporting.h"
|
||||
#include "Core/System.h"
|
||||
|
@ -56,12 +55,14 @@ std::atomic_flag atomicLock_;
|
|||
FixedSizeQueue<s16, 32768 * 8> chanSampleQueues[PSP_AUDIO_CHANNEL_MAX + 1];
|
||||
|
||||
int eventAudioUpdate = -1;
|
||||
|
||||
// TODO: This is now useless and should be removed. Just scared of breaking states.
|
||||
int eventHostAudioUpdate = -1;
|
||||
|
||||
int mixFrequency = 44100;
|
||||
int srcFrequency = 0;
|
||||
|
||||
const int hwSampleRate = 44100;
|
||||
|
||||
const int hwBlockSize = 64;
|
||||
|
||||
static int audioIntervalCycles;
|
||||
|
@ -88,10 +89,6 @@ static void hleAudioUpdate(u64 userdata, int cyclesLate) {
|
|||
|
||||
static void hleHostAudioUpdate(u64 userdata, int cyclesLate) {
|
||||
CoreTiming::ScheduleEvent(audioHostIntervalCycles - cyclesLate, eventHostAudioUpdate, 0);
|
||||
|
||||
// Not all hosts need this call to poke their audio system once in a while, but those that don't
|
||||
// can just ignore it.
|
||||
host->UpdateSound();
|
||||
}
|
||||
|
||||
static void __AudioCPUMHzChange() {
|
||||
|
|
|
@ -56,14 +56,14 @@
|
|||
#include <cstring>
|
||||
|
||||
#include "Common/Data/Text/I18n.h"
|
||||
#include "Common/Thread/ThreadUtil.h"
|
||||
#include "Common/Data/Text/Parsers.h"
|
||||
#include "Common/System/System.h"
|
||||
#include "Common/Thread/ThreadUtil.h"
|
||||
|
||||
#include "Common/Serialize/SerializeFuncs.h"
|
||||
#include "Common/TimeUtil.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/HLE/sceKernelInterrupt.h"
|
||||
#include "Core/HLE/sceKernelThread.h"
|
||||
#include "Core/HLE/sceKernelMemory.h"
|
||||
|
@ -1385,7 +1385,7 @@ int friendFinder(){
|
|||
g_adhocServerIP.in.sin_addr.s_addr = INADDR_NONE;
|
||||
if (g_Config.bEnableWlan && !net::DNSResolve(g_Config.proAdhocServer, "", &resolved, err)) {
|
||||
ERROR_LOG(SCENET, "DNS Error Resolving %s\n", g_Config.proAdhocServer.c_str());
|
||||
host->NotifyUserMessage(n->T("DNS Error Resolving ") + g_Config.proAdhocServer, 2.0f, 0x0000ff);
|
||||
System_NotifyUserMessage(n->T("DNS Error Resolving ") + g_Config.proAdhocServer, 2.0f, 0x0000ff);
|
||||
}
|
||||
if (resolved) {
|
||||
for (auto ptr = resolved; ptr != NULL; ptr = ptr->ai_next) {
|
||||
|
@ -1447,7 +1447,7 @@ int friendFinder(){
|
|||
shutdown((int)metasocket, SD_BOTH);
|
||||
closesocket((int)metasocket);
|
||||
metasocket = (int)INVALID_SOCKET;
|
||||
host->NotifyUserMessage(std::string(n->T("Disconnected from AdhocServer")) + " (" + std::string(n->T("Error")) + ": " + std::to_string(error) + ")", 2.0, 0x0000ff);
|
||||
System_NotifyUserMessage(std::string(n->T("Disconnected from AdhocServer")) + " (" + std::string(n->T("Error")) + ": " + std::to_string(error) + ")", 2.0, 0x0000ff);
|
||||
// Mark all friends as timedout since we won't be able to detects disconnected friends anymore without being connected to Adhoc Server
|
||||
peerlock.lock();
|
||||
timeoutFriendsRecursive(friends);
|
||||
|
@ -2191,7 +2191,7 @@ int initNetwork(SceNetAdhocctlAdhocId *adhoc_id){
|
|||
iResult = bind((int)metasocket, &g_localhostIP.addr, sizeof(g_localhostIP.addr));
|
||||
if (iResult == SOCKET_ERROR) {
|
||||
ERROR_LOG(SCENET, "Bind to alternate localhost[%s] failed(%i).", ip2str(g_localhostIP.in.sin_addr).c_str(), iResult);
|
||||
host->NotifyUserMessage(std::string(n->T("Failed to Bind Localhost IP")) + " " + ip2str(g_localhostIP.in.sin_addr).c_str(), 2.0, 0x0000ff);
|
||||
System_NotifyUserMessage(std::string(n->T("Failed to Bind Localhost IP")) + " " + ip2str(g_localhostIP.in.sin_addr).c_str(), 2.0, 0x0000ff);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2246,7 +2246,7 @@ int initNetwork(SceNetAdhocctlAdhocId *adhoc_id){
|
|||
}
|
||||
if (!done) {
|
||||
ERROR_LOG(SCENET, "Socket error (%i) when connecting to AdhocServer [%s/%s:%u]", errorcode, g_Config.proAdhocServer.c_str(), ip2str(g_adhocServerIP.in.sin_addr).c_str(), ntohs(g_adhocServerIP.in.sin_port));
|
||||
host->NotifyUserMessage(std::string(n->T("Failed to connect to Adhoc Server")) + " (" + std::string(n->T("Error")) + ": " + std::to_string(errorcode) + ")", 1.0f, 0x0000ff);
|
||||
System_NotifyUserMessage(std::string(n->T("Failed to connect to Adhoc Server")) + " (" + std::string(n->T("Error")) + ": " + std::to_string(errorcode) + ")", 1.0f, 0x0000ff);
|
||||
return iResult;
|
||||
}
|
||||
}
|
||||
|
@ -2268,7 +2268,7 @@ int initNetwork(SceNetAdhocctlAdhocId *adhoc_id){
|
|||
socklen_t addrLen = sizeof(LocalIP);
|
||||
memset(&LocalIP, 0, addrLen);
|
||||
getsockname((int)metasocket, &LocalIP, &addrLen);
|
||||
host->NotifyUserMessage(n->T("Network Initialized"), 1.0);
|
||||
System_NotifyUserMessage(n->T("Network Initialized"), 1.0);
|
||||
return 0;
|
||||
}
|
||||
else{
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
|
||||
#include "ppsspp_config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <signal.h>
|
||||
|
||||
#if defined(HAVE_LIBNX) || PPSSPP_PLATFORM(SWITCH)
|
||||
|
@ -35,10 +35,6 @@
|
|||
extern "C" struct hostent *gethostbyname(const char *name);
|
||||
#endif // defined(HAVE_LIBNX) || PPSSPP_PLATFORM(SWITCH)
|
||||
|
||||
#if !defined(__APPLE__)
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
// Net stuff
|
||||
#if defined(_WIN32)
|
||||
|
@ -61,13 +57,13 @@ extern "C" struct hostent *gethostbyname(const char *name);
|
|||
|
||||
#include "Common/Data/Text/I18n.h"
|
||||
#include "Common/Thread/ThreadUtil.h"
|
||||
#include "Common/System/System.h"
|
||||
|
||||
#include "Common/File/FileUtil.h"
|
||||
#include "Common/TimeUtil.h"
|
||||
#include "Core/Util/PortManager.h"
|
||||
#include "Core/Instance.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/HLE/proAdhocServer.h"
|
||||
|
||||
// User Count
|
||||
|
@ -1862,7 +1858,7 @@ int create_listen_socket(uint16_t port)
|
|||
else {
|
||||
ERROR_LOG(SCENET, "AdhocServer: Bind returned %i (Socket error %d)", bindresult, errno);
|
||||
auto n = GetI18NCategory("Networking");
|
||||
host->NotifyUserMessage(std::string(n->T("AdhocServer Failed to Bind Port")) + " " + std::to_string(port), 3.0, 0x0000ff);
|
||||
System_NotifyUserMessage(std::string(n->T("AdhocServer Failed to Bind Port")) + " " + std::to_string(port), 3.0, 0x0000ff);
|
||||
}
|
||||
|
||||
// Close Socket
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include "Common/Serialize/SerializeFuncs.h"
|
||||
#include "Common/Data/Collections/FixedSizeQueue.h"
|
||||
#include "Core/MIPS/MIPS.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/CoreTiming.h"
|
||||
#include "Core/HLE/HLE.h"
|
||||
#include "Core/HLE/FunctionWrappers.h"
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
#include "Core/Config.h"
|
||||
#include "Core/CoreTiming.h"
|
||||
#include "Core/CoreParameter.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/Reporting.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/System.h"
|
||||
|
@ -573,9 +572,9 @@ void __DisplayFlip(int cyclesLate) {
|
|||
#ifndef _DEBUG
|
||||
auto err = GetI18NCategory("Error");
|
||||
if (g_Config.bSoftwareRendering) {
|
||||
host->NotifyUserMessage(err->T("Running slow: Try turning off Software Rendering"), 6.0f, 0xFF30D0D0);
|
||||
System_NotifyUserMessage(err->T("Running slow: Try turning off Software Rendering"), 6.0f, 0xFF30D0D0);
|
||||
} else {
|
||||
host->NotifyUserMessage(err->T("Running slow: try frameskip, sound is choppy when slow"), 6.0f, 0xFF30D0D0);
|
||||
System_NotifyUserMessage(err->T("Running slow: try frameskip, sound is choppy when slow"), 6.0f, 0xFF30D0D0);
|
||||
}
|
||||
#endif
|
||||
hasNotifiedSlow = true;
|
||||
|
|
|
@ -2012,7 +2012,7 @@ static u32 sceIoDevctl(const char *name, int cmd, u32 argAddr, int argLen, u32 o
|
|||
case EMULATOR_DEVCTL__SEND_OUTPUT:
|
||||
{
|
||||
std::string data(Memory::GetCharPointer(argAddr), argLen);
|
||||
if (PSP_CoreParameter().printfEmuLog) {
|
||||
if (PSP_CoreParameter().printfEmuLog && host) {
|
||||
host->SendDebugOutput(data);
|
||||
} else {
|
||||
if (PSP_CoreParameter().collectEmuLog) {
|
||||
|
@ -2040,7 +2040,9 @@ static u32 sceIoDevctl(const char *name, int cmd, u32 argAddr, int argLen, u32 o
|
|||
|
||||
__DisplayGetFramebuf(&topaddr, &linesize, nullptr, 0);
|
||||
// TODO: Convert based on pixel format / mode / something?
|
||||
host->SendDebugScreenshot(topaddr, linesize, 272);
|
||||
if (host) {
|
||||
host->SendDebugScreenshot(topaddr, linesize, 272);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
case EMULATOR_DEVCTL__TOGGLE_FASTFORWARD:
|
||||
|
|
|
@ -1934,7 +1934,9 @@ void __KernelGPUReplay() {
|
|||
PSPPointer<u8> topaddr;
|
||||
u32 linesize = 512;
|
||||
__DisplayGetFramebuf(&topaddr, &linesize, nullptr, 0);
|
||||
host->SendDebugScreenshot(topaddr, linesize, 272);
|
||||
if (host) {
|
||||
host->SendDebugScreenshot(topaddr, linesize, 272);
|
||||
}
|
||||
Core_Stop();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,22 +30,24 @@
|
|||
#endif
|
||||
|
||||
#include <mutex>
|
||||
#include "Common/Thread/ThreadUtil.h"
|
||||
// sceNetAdhoc
|
||||
|
||||
// This is a direct port of Coldbird's code from http://code.google.com/p/aemu/
|
||||
// All credit goes to him!
|
||||
#include "Core/Config.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/Reporting.h"
|
||||
#include "Core/MemMapHelpers.h"
|
||||
#include "Common/Data/Text/I18n.h"
|
||||
#include "Common/Serialize/Serializer.h"
|
||||
#include "Common/Serialize/SerializeFuncs.h"
|
||||
#include "Common/Serialize/SerializeMap.h"
|
||||
#include "Common/System/System.h"
|
||||
#include "Common/Thread/ThreadUtil.h"
|
||||
#include "Common/TimeUtil.h"
|
||||
|
||||
#include "Core/MIPS/MIPSCodeUtils.h"
|
||||
#include "Core/Util/PortManager.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/Reporting.h"
|
||||
#include "Core/MemMapHelpers.h"
|
||||
|
||||
#include "Core/HLE/HLEHelperThread.h"
|
||||
#include "Core/HLE/FunctionWrappers.h"
|
||||
|
@ -58,7 +60,6 @@
|
|||
#include "Core/HLE/sceNet.h"
|
||||
#include "Core/HLE/proAdhocServer.h"
|
||||
#include "Core/HLE/KernelWaitHelpers.h"
|
||||
#include "Common/Data/Text/I18n.h"
|
||||
|
||||
|
||||
// shared in sceNetAdhoc.h since it need to be used from sceNet.cpp also
|
||||
|
@ -275,7 +276,7 @@ static void __GameModeNotify(u64 userdata, int cyclesLate) {
|
|||
if (peer != NULL)
|
||||
truncate_cpy(name, sizeof(name), (const char*)peer->nickname.data);
|
||||
WARN_LOG(SCENET, "GameMode: Unknown Source Port from [%s][%s:%u -> %u] (Result=%i, Size=%i)", name, mac2str(&sendermac).c_str(), senderport, ADHOC_GAMEMODE_PORT, ret, bufsz);
|
||||
host->NotifyUserMessage(std::string(n->T("GM: Data from Unknown Port")) + std::string(" [") + std::string(name) + std::string("]:") + std::to_string(senderport) + std::string(" -> ") + std::to_string(ADHOC_GAMEMODE_PORT) + std::string(" (") + std::to_string(portOffset) + std::string(")"), 2.0, 0x0080ff);
|
||||
System_NotifyUserMessage(std::string(n->T("GM: Data from Unknown Port")) + std::string(" [") + std::string(name) + std::string("]:") + std::to_string(senderport) + std::string(" -> ") + std::to_string(ADHOC_GAMEMODE_PORT) + std::string(" (") + std::to_string(portOffset) + std::string(")"), 2.0, 0x0080ff);
|
||||
peerlock.unlock();
|
||||
}
|
||||
// Keeping track of the source port for further communication, in case it was re-mapped by router or ISP for some reason.
|
||||
|
@ -1505,7 +1506,7 @@ static int sceNetAdhocPdpCreate(const char *mac, int port, int bufferSize, u32 f
|
|||
if (iResult == SOCKET_ERROR) {
|
||||
ERROR_LOG(SCENET, "Socket error (%i) when binding port %u", errno, ntohs(addr.sin_port));
|
||||
auto n = GetI18NCategory("Networking");
|
||||
host->NotifyUserMessage(std::string(n->T("Failed to Bind Port")) + " " + std::to_string(port + portOffset) + "\n" + std::string(n->T("Please change your Port Offset")), 3.0, 0x0000ff);
|
||||
System_NotifyUserMessage(std::string(n->T("Failed to Bind Port")) + " " + std::to_string(port + portOffset) + "\n" + std::string(n->T("Please change your Port Offset")), 3.0, 0x0000ff);
|
||||
|
||||
return hleLogDebug(SCENET, ERROR_NET_ADHOC_PORT_NOT_AVAIL, "port not available");
|
||||
}
|
||||
|
@ -3522,7 +3523,7 @@ static int sceNetAdhocPtpOpen(const char *srcmac, int sport, const char *dstmac,
|
|||
else {
|
||||
ERROR_LOG(SCENET, "Socket error (%i) when binding port %u", errno, ntohs(addr.sin_port));
|
||||
auto n = GetI18NCategory("Networking");
|
||||
host->NotifyUserMessage(std::string(n->T("Failed to Bind Port")) + " " + std::to_string(sport + portOffset) + "\n" + std::string(n->T("Please change your Port Offset")), 3.0, 0x0000ff);
|
||||
System_NotifyUserMessage(std::string(n->T("Failed to Bind Port")) + " " + std::to_string(sport + portOffset) + "\n" + std::string(n->T("Please change your Port Offset")), 3.0, 0x0000ff);
|
||||
}
|
||||
|
||||
// Close Socket
|
||||
|
@ -4115,7 +4116,7 @@ static int sceNetAdhocPtpListen(const char *srcmac, int sport, int bufsize, int
|
|||
}
|
||||
else {
|
||||
auto n = GetI18NCategory("Networking");
|
||||
host->NotifyUserMessage(std::string(n->T("Failed to Bind Port")) + " " + std::to_string(sport + portOffset) + "\n" + std::string(n->T("Please change your Port Offset")), 3.0, 0x0000ff);
|
||||
System_NotifyUserMessage(std::string(n->T("Failed to Bind Port")) + " " + std::to_string(sport + portOffset) + "\n" + std::string(n->T("Please change your Port Offset")), 3.0, 0x0000ff);
|
||||
}
|
||||
|
||||
if (iResult == SOCKET_ERROR) {
|
||||
|
@ -7780,7 +7781,7 @@ int matchingInputThread(int matchingId) // TODO: The MatchingInput thread is usi
|
|||
if (peer != NULL)
|
||||
truncate_cpy(name, sizeof(name), (const char*)peer->nickname.data);
|
||||
WARN_LOG(SCENET, "InputLoop[%d]: Unknown Source Port from [%s][%s:%u -> %u] (Recved=%i, Length=%i)", matchingId, name, mac2str(&sendermac).c_str(), senderport, context->port, recvresult, rxbuflen);
|
||||
host->NotifyUserMessage(std::string(n->T("AM: Data from Unknown Port")) + std::string(" [") + std::string(name) + std::string("]:") + std::to_string(senderport) + std::string(" -> ") + std::to_string(context->port) + std::string(" (") + std::to_string(portOffset) + std::string(")"), 2.0, 0x0080ff);
|
||||
System_NotifyUserMessage(std::string(n->T("AM: Data from Unknown Port")) + std::string(" [") + std::string(name) + std::string("]:") + std::to_string(senderport) + std::string(" -> ") + std::to_string(context->port) + std::string(" (") + std::to_string(portOffset) + std::string(")"), 2.0, 0x0080ff);
|
||||
}
|
||||
// Keep tracks of re-mapped peer's ports for further communication.
|
||||
// Note: This will only works if this player were able to receives data on normal port from other players (ie. this player's port wasn't remapped)
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include "Core/Loaders.h"
|
||||
#include "Core/MemMap.h"
|
||||
#include "Core/System.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/CoreTiming.h"
|
||||
#include "Core/Reporting.h"
|
||||
#include "Core/MIPS/MIPS.h"
|
||||
|
|
|
@ -27,10 +27,6 @@ class Host {
|
|||
public:
|
||||
virtual ~Host() {}
|
||||
|
||||
virtual void UpdateSound() {} // still needed for libretro, will need a proper effort.
|
||||
|
||||
virtual void NotifyUserMessage(const std::string &message, float duration = 1.0f, u32 color = 0x00FFFFFF, const char *id = nullptr) {}
|
||||
|
||||
virtual void SendDebugOutput(const std::string &output) {}
|
||||
virtual void SendDebugScreenshot(const u8 *pixbuf, u32 w, u32 h) {}
|
||||
};
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include "Core/Debugger/Breakpoints.h"
|
||||
#include "Core/HLE/HLE.h"
|
||||
#include "Core/HLE/ReplaceTables.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/MemMap.h"
|
||||
#include "Core/MIPS/MIPS.h"
|
||||
#include "Core/MIPS/MIPSTables.h"
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#include "Core/MIPS/MIPS.h"
|
||||
#include "Core/MIPS/MIPSTables.h"
|
||||
#include "Core/MIPS/MIPSCodeUtils.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/MemMap.h"
|
||||
|
||||
namespace MIPSCodeUtils
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include "Common/CommonTypes.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/MemMap.h"
|
||||
#include "Core/MIPS/MIPS.h"
|
||||
#include "Core/MIPS/MIPSCodeUtils.h"
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include "Core/Reporting.h"
|
||||
#include "Core/HLE/HLE.h"
|
||||
#include "Core/HLE/HLETables.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/MemMap.h"
|
||||
|
||||
#include "Core/MIPS/MIPS.h"
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
#include "RegCache.h"
|
||||
#include "Jit.h"
|
||||
|
||||
#include "Core/Host.h"
|
||||
#include "Core/Debugger/Breakpoints.h"
|
||||
|
||||
namespace MIPSComp
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
#include "Core/MemMap.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/ConfigValues.h"
|
||||
#include "Core/Host.h"
|
||||
|
||||
#include "Core/MIPS/MIPS.h"
|
||||
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
#include "Core/Config.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/CoreTiming.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/Screenshot.h"
|
||||
#include "Core/System.h"
|
||||
#include "Core/FileSystems/MetaFileSystem.h"
|
||||
|
|
|
@ -49,7 +49,6 @@
|
|||
#include "Core/MIPS/MIPSAnalyst.h"
|
||||
#include "Core/MIPS/MIPSVFPUUtils.h"
|
||||
#include "Core/Debugger/SymbolMap.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/System.h"
|
||||
#include "Core/HLE/HLE.h"
|
||||
#include "Core/HLE/Plugins.h"
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
#include "Core/Config.h"
|
||||
#include "Common/BitScan.h"
|
||||
#include "Core/HDRemaster.h"
|
||||
#include "Core/Host.h"
|
||||
#include "GPU/ge_constants.h"
|
||||
#include "GPU/GPUState.h"
|
||||
#include "GPU/GPUInterface.h"
|
||||
|
|
|
@ -30,18 +30,18 @@
|
|||
#include <cstring>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
|
||||
#include "Common/TimeUtil.h"
|
||||
#include "Common/Data/Text/I18n.h"
|
||||
#include "Common/Net/Resolve.h"
|
||||
#include "Common/Thread/ThreadUtil.h"
|
||||
#include "Common/System/System.h"
|
||||
#include "Common/Log.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/System.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/ELF/ParamSFO.h"
|
||||
#include "Core/Util/PortManager.h"
|
||||
|
||||
|
||||
PortManager g_PortManager;
|
||||
bool upnpServiceRunning = false;
|
||||
std::thread upnpServiceThread;
|
||||
|
@ -190,7 +190,7 @@ bool PortManager::Initialize(const unsigned int timeout) {
|
|||
ERROR_LOG(SCENET, "PortManager - upnpDiscover failed (error: %i) or No UPnP device detected", error);
|
||||
if (g_Config.bEnableUPnP) {
|
||||
auto n = GetI18NCategory("Networking");
|
||||
host->NotifyUserMessage(n->T("Unable to find UPnP device"), 2.0f, 0x0000ff);
|
||||
System_NotifyUserMessage(n->T("Unable to find UPnP device"), 2.0f, 0x0000ff);
|
||||
}
|
||||
m_InitState = UPNP_INITSTATE_NONE;
|
||||
#endif // WITH_UPNP
|
||||
|
@ -215,7 +215,7 @@ bool PortManager::Add(const char* protocol, unsigned short port, unsigned short
|
|||
{
|
||||
if (g_Config.bEnableUPnP) {
|
||||
WARN_LOG(SCENET, "PortManager::Add - the init was not done !");
|
||||
host->NotifyUserMessage(n->T("UPnP need to be reinitialized"), 2.0f, 0x0000ff);
|
||||
System_NotifyUserMessage(n->T("UPnP need to be reinitialized"), 2.0f, 0x0000ff);
|
||||
}
|
||||
Terminate();
|
||||
return false;
|
||||
|
@ -244,7 +244,7 @@ bool PortManager::Add(const char* protocol, unsigned short port, unsigned short
|
|||
ERROR_LOG(SCENET, "PortManager - AddPortMapping failed (error: %i)", r);
|
||||
if (r == UPNPCOMMAND_HTTP_ERROR) {
|
||||
if (g_Config.bEnableUPnP) {
|
||||
host->NotifyUserMessage(n->T("UPnP need to be reinitialized"), 2.0f, 0x0000ff);
|
||||
System_NotifyUserMessage(n->T("UPnP need to be reinitialized"), 2.0f, 0x0000ff);
|
||||
}
|
||||
Terminate(); // Most of the time errors occurred because the router is no longer reachable (ie. changed networks) so we should invalidate the state to prevent further lags due to timeouts
|
||||
return false;
|
||||
|
@ -270,7 +270,7 @@ bool PortManager::Remove(const char* protocol, unsigned short port) {
|
|||
{
|
||||
if (g_Config.bEnableUPnP) {
|
||||
WARN_LOG(SCENET, "PortManager::Remove - the init was not done !");
|
||||
host->NotifyUserMessage(n->T("UPnP need to be reinitialized"), 2.0f, 0x0000ff);
|
||||
System_NotifyUserMessage(n->T("UPnP need to be reinitialized"), 2.0f, 0x0000ff);
|
||||
}
|
||||
Terminate();
|
||||
return false;
|
||||
|
@ -282,7 +282,7 @@ bool PortManager::Remove(const char* protocol, unsigned short port) {
|
|||
ERROR_LOG(SCENET, "PortManager - DeletePortMapping failed (error: %i)", r);
|
||||
if (r == UPNPCOMMAND_HTTP_ERROR) {
|
||||
if (g_Config.bEnableUPnP) {
|
||||
host->NotifyUserMessage(n->T("UPnP need to be reinitialized"), 2.0f, 0x0000ff);
|
||||
System_NotifyUserMessage(n->T("UPnP need to be reinitialized"), 2.0f, 0x0000ff);
|
||||
}
|
||||
Terminate(); // Most of the time errors occurred because the router is no longer reachable (ie. changed networks) so we should invalidate the state to prevent further lags due to timeouts
|
||||
return false;
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "Common/Math/lin/matrix4x4.h"
|
||||
#include "Common/Math/math_util.h"
|
||||
#include "Common/System/Display.h"
|
||||
#include "Common/System/System.h"
|
||||
#include "Common/VR/PPSSPPVR.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/StringUtils.h"
|
||||
|
@ -36,7 +37,6 @@
|
|||
#include "Core/Core.h"
|
||||
#include "Core/CoreParameter.h"
|
||||
#include "Core/Debugger/MemBlockInfo.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/MIPS/MIPS.h"
|
||||
#include "GPU/Common/DrawEngineCommon.h"
|
||||
#include "GPU/Common/FramebufferManagerCommon.h"
|
||||
|
@ -2664,7 +2664,7 @@ void FramebufferManagerCommon::ShowScreenResolution() {
|
|||
messageStream << gr->T("Window Size") << ": ";
|
||||
messageStream << PSP_CoreParameter().pixelWidth << "x" << PSP_CoreParameter().pixelHeight;
|
||||
|
||||
host->NotifyUserMessage(messageStream.str(), 2.0f, 0xFFFFFF, "resize");
|
||||
System_NotifyUserMessage(messageStream.str(), 2.0f, 0xFFFFFF, "resize");
|
||||
INFO_LOG(SYSTEM, "%s", messageStream.str().c_str());
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#include "Common/TimeUtil.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/ConfigValues.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/System.h"
|
||||
#include "Core/HW/Display.h"
|
||||
#include "GPU/Common/PostShader.h"
|
||||
|
@ -428,9 +427,9 @@ void PresentationCommon::ShowPostShaderError(const std::string &errorString) {
|
|||
}
|
||||
}
|
||||
if (!firstLine.empty()) {
|
||||
host->NotifyUserMessage("Post-shader error: " + firstLine + "...:\n" + errorString, 10.0f, 0xFF3090FF);
|
||||
System_NotifyUserMessage("Post-shader error: " + firstLine + "...:\n" + errorString, 10.0f, 0xFF3090FF);
|
||||
} else {
|
||||
host->NotifyUserMessage("Post-shader error, see log for details", 10.0f, 0xFF3090FF);
|
||||
System_NotifyUserMessage("Post-shader error, see log for details", 10.0f, 0xFF3090FF);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -37,12 +37,12 @@
|
|||
#include "Common/File/VFS/VFS.h"
|
||||
#include "Common/LogReporting.h"
|
||||
#include "Common/StringUtils.h"
|
||||
#include "Common/System/System.h"
|
||||
#include "Common/Thread/ParallelLoop.h"
|
||||
#include "Common/Thread/Waitable.h"
|
||||
#include "Common/Thread/ThreadManager.h"
|
||||
#include "Common/TimeUtil.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/System.h"
|
||||
#include "Core/ThreadPools.h"
|
||||
#include "Core/ELF/ParamSFO.h"
|
||||
|
@ -279,7 +279,7 @@ bool TextureReplacer::LoadIniValues(IniFile &ini, bool isOverride) {
|
|||
|
||||
if (filenameWarning) {
|
||||
auto err = GetI18NCategory("Error");
|
||||
host->NotifyUserMessage(err->T("textures.ini filenames may not be cross-platform (banned characters)"), 6.0f);
|
||||
System_NotifyUserMessage(err->T("textures.ini filenames may not be cross-platform (banned characters)"), 6.0f);
|
||||
}
|
||||
|
||||
if (ini.HasSection("hashranges")) {
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
#include "GPU/Common/FramebufferManagerCommon.h"
|
||||
#include "GPU/Common/TextureDecoder.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/Host.h"
|
||||
|
||||
#include "ext/xxhash.h"
|
||||
#include "Common/Math/math_util.h"
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include "Core/Debugger/Breakpoints.h"
|
||||
#include "Core/MemMapHelpers.h"
|
||||
#include "Core/MIPS/MIPS.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/ConfigValues.h"
|
||||
#include "Core/System.h"
|
||||
|
@ -89,7 +88,7 @@ GPU_DX9::GPU_DX9(GraphicsContext *gfxCtx, Draw::DrawContext *draw)
|
|||
// Disable hardware tessellation bacause DX9 is still unsupported.
|
||||
ERROR_LOG(G3D, "Hardware Tessellation is unsupported, falling back to software tessellation");
|
||||
auto gr = GetI18NCategory("Graphics");
|
||||
host->NotifyUserMessage(gr->T("Turn off Hardware Tessellation - unsupported"), 2.5f, 0xFF3030FF);
|
||||
System_NotifyUserMessage(gr->T("Turn off Hardware Tessellation - unsupported"), 2.5f, 0xFF3030FF);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "Common/Math/math_util.h"
|
||||
#include "Common/GPU/D3D9/D3D9ShaderCompiler.h"
|
||||
#include "Common/GPU/thin3d.h"
|
||||
#include "Common/System/System.h"
|
||||
#include "Common/System/Display.h"
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
|
@ -37,7 +38,6 @@
|
|||
#include "Common/StringUtils.h"
|
||||
|
||||
#include "Core/Config.h"
|
||||
#include "Core/Host.h"
|
||||
#include "GPU/Math3D.h"
|
||||
#include "GPU/GPUState.h"
|
||||
#include "GPU/ge_constants.h"
|
||||
|
@ -608,7 +608,7 @@ VSShader *ShaderManagerDX9::ApplyShader(bool useHWTransform, bool useHWTessellat
|
|||
ERROR_LOG(G3D, "Shader compilation failed, falling back to software transform");
|
||||
}
|
||||
if (!g_Config.bHideSlowWarnings) {
|
||||
host->NotifyUserMessage(gr->T("hardware transform error - falling back to software"), 2.5f, 0xFF3030FF);
|
||||
System_NotifyUserMessage(gr->T("hardware transform error - falling back to software"), 2.5f, 0xFF3030FF);
|
||||
}
|
||||
delete vs;
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include "GPU/Common/FramebufferManagerCommon.h"
|
||||
#include "GPU/Common/TextureDecoder.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/Host.h"
|
||||
|
||||
#include "ext/xxhash.h"
|
||||
#include "Common/Math/math_util.h"
|
||||
|
|
|
@ -22,12 +22,12 @@
|
|||
#include "Common/Serialize/Serializer.h"
|
||||
#include "Common/File/FileUtil.h"
|
||||
#include "Common/GraphicsContext.h"
|
||||
#include "Common/System/System.h"
|
||||
#include "Common/VR/PPSSPPVR.h"
|
||||
|
||||
#include "Core/Config.h"
|
||||
#include "Core/Debugger/Breakpoints.h"
|
||||
#include "Core/MemMapHelpers.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/Reporting.h"
|
||||
#include "Core/System.h"
|
||||
|
@ -122,7 +122,7 @@ GPU_GLES::GPU_GLES(GraphicsContext *gfxCtx, Draw::DrawContext *draw)
|
|||
if (!drawEngine_.SupportsHWTessellation()) {
|
||||
ERROR_LOG(G3D, "Hardware Tessellation is unsupported, falling back to software tessellation");
|
||||
auto gr = GetI18NCategory("Graphics");
|
||||
host->NotifyUserMessage(gr->T("Turn off Hardware Tessellation - unsupported"), 2.5f, 0xFF3030FF);
|
||||
System_NotifyUserMessage(gr->T("Turn off Hardware Tessellation - unsupported"), 2.5f, 0xFF3030FF);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,13 +35,13 @@
|
|||
#include "Common/GPU/thin3d.h"
|
||||
#include "Common/GPU/OpenGL/GLRenderManager.h"
|
||||
#include "Common/System/Display.h"
|
||||
#include "Common/System/System.h"
|
||||
#include "Common/VR/PPSSPPVR.h"
|
||||
|
||||
#include "Common/Log.h"
|
||||
#include "Common/File/FileUtil.h"
|
||||
#include "Common/TimeUtil.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/System.h"
|
||||
#include "GPU/Math3D.h"
|
||||
#include "GPU/GPUState.h"
|
||||
|
@ -801,7 +801,7 @@ Shader *ShaderManagerGLES::ApplyVertexShader(bool useHWTransform, bool useHWTess
|
|||
auto gr = GetI18NCategory("Graphics");
|
||||
ERROR_LOG(G3D, "Vertex shader generation failed, falling back to software transform");
|
||||
if (!g_Config.bHideSlowWarnings) {
|
||||
host->NotifyUserMessage(gr->T("hardware transform error - falling back to software"), 2.5f, 0xFF3030FF);
|
||||
System_NotifyUserMessage(gr->T("hardware transform error - falling back to software"), 2.5f, 0xFF3030FF);
|
||||
}
|
||||
delete vs;
|
||||
|
||||
|
|
|
@ -24,11 +24,11 @@
|
|||
#include "Common/Data/Text/I18n.h"
|
||||
#include "Common/Math/math_util.h"
|
||||
#include "Common/Profiler/Profiler.h"
|
||||
#include "Common/System/System.h"
|
||||
#include "Common/GPU/OpenGL/GLRenderManager.h"
|
||||
#include "Common/TimeUtil.h"
|
||||
|
||||
#include "Core/Config.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/MemMap.h"
|
||||
#include "GPU/ge_constants.h"
|
||||
#include "GPU/GPUState.h"
|
||||
|
@ -150,9 +150,9 @@ void TextureCacheGLES::StartFrame() {
|
|||
|
||||
auto err = GetI18NCategory("Error");
|
||||
if (standardScaleFactor_ > 1) {
|
||||
host->NotifyUserMessage(err->T("Warning: Video memory FULL, reducing upscaling and switching to slow caching mode"), 2.0f);
|
||||
System_NotifyUserMessage(err->T("Warning: Video memory FULL, reducing upscaling and switching to slow caching mode"), 2.0f);
|
||||
} else {
|
||||
host->NotifyUserMessage(err->T("Warning: Video memory FULL, switching to slow caching mode"), 2.0f);
|
||||
System_NotifyUserMessage(err->T("Warning: Video memory FULL, switching to slow caching mode"), 2.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#include "Core/CoreTiming.h"
|
||||
#include "Core/Debugger/MemBlockInfo.h"
|
||||
#include "Core/MemMap.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/Reporting.h"
|
||||
#include "Core/HLE/HLE.h"
|
||||
#include "Core/HLE/sceKernelMemory.h"
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include <cstring>
|
||||
|
||||
#include "ext/xxhash.h"
|
||||
|
||||
#include "Common/File/VFS/VFS.h"
|
||||
#include "Common/Data/Text/I18n.h"
|
||||
#include "Common/LogReporting.h"
|
||||
|
@ -26,19 +27,18 @@
|
|||
#include "Common/Profiler/Profiler.h"
|
||||
#include "Common/GPU/thin3d.h"
|
||||
#include "Common/GPU/Vulkan/VulkanRenderManager.h"
|
||||
|
||||
#include "Common/System/System.h"
|
||||
#include "Common/Data/Convert/ColorConv.h"
|
||||
#include "Common/StringUtils.h"
|
||||
#include "Common/TimeUtil.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/MemMap.h"
|
||||
#include "Core/System.h"
|
||||
|
||||
#include "Common/GPU/Vulkan/VulkanContext.h"
|
||||
#include "Common/GPU/Vulkan/VulkanImage.h"
|
||||
#include "Common/GPU/Vulkan/VulkanMemory.h"
|
||||
|
||||
#include "Core/Config.h"
|
||||
#include "Core/MemMap.h"
|
||||
#include "Core/System.h"
|
||||
|
||||
#include "GPU/ge_constants.h"
|
||||
#include "GPU/GPUState.h"
|
||||
#include "GPU/Common/TextureShaderCommon.h"
|
||||
|
@ -513,9 +513,9 @@ void TextureCacheVulkan::BuildTexture(TexCacheEntry *const entry) {
|
|||
|
||||
auto err = GetI18NCategory("Error");
|
||||
if (plan.scaleFactor > 1) {
|
||||
host->NotifyUserMessage(err->T("Warning: Video memory FULL, reducing upscaling and switching to slow caching mode"), 2.0f);
|
||||
System_NotifyUserMessage(err->T("Warning: Video memory FULL, reducing upscaling and switching to slow caching mode"), 2.0f);
|
||||
} else {
|
||||
host->NotifyUserMessage(err->T("Warning: Video memory FULL, switching to slow caching mode"), 2.0f);
|
||||
System_NotifyUserMessage(err->T("Warning: Video memory FULL, switching to slow caching mode"), 2.0f);
|
||||
}
|
||||
|
||||
// Turn off texture replacement for this texture.
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
// Copyright (c) 2014- PPSSPP Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0 or later versions.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#include "Qt/QtHost.h"
|
47
Qt/QtHost.h
47
Qt/QtHost.h
|
@ -1,47 +0,0 @@
|
|||
// Copyright (c) 2014- PPSSPP Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0 or later versions.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Core/Host.h"
|
||||
#include "UI/OnScreenDisplay.h"
|
||||
|
||||
#include "Qt/mainwindow.h"
|
||||
#include "Core/Debugger/SymbolMap.h"
|
||||
|
||||
class QtHost : public Host {
|
||||
public:
|
||||
QtHost(MainWindow *mainWindow_)
|
||||
{
|
||||
mainWindow = mainWindow_;
|
||||
}
|
||||
|
||||
void UpdateSound() override {}
|
||||
|
||||
void PrepareShutdown() {
|
||||
auto fn = SymbolMapFilename(PSP_CoreParameter().fileToStart);
|
||||
g_symbolMap->SaveSymbolMap(fn);
|
||||
}
|
||||
|
||||
void NotifyUserMessage(const std::string &message, float duration = 1.0f, u32 color = 0x00FFFFFF, const char *id = nullptr) override {
|
||||
osm.Show(message, duration, color, -1, true, id);
|
||||
}
|
||||
|
||||
private:
|
||||
Path SymbolMapFilename(Path currentFilename);
|
||||
MainWindow* mainWindow;
|
||||
};
|
|
@ -40,7 +40,6 @@
|
|||
#include "Common/Profiler/Profiler.h"
|
||||
|
||||
#include "QtMain.h"
|
||||
#include "QtHost.h"
|
||||
#include "Qt/mainwindow.h"
|
||||
#include "Common/Data/Text/I18n.h"
|
||||
#include "Common/Thread/ThreadUtil.h"
|
||||
|
@ -48,6 +47,7 @@
|
|||
#include "Common/StringUtils.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/ConfigValues.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/HW/Camera.h"
|
||||
#include "Core/Debugger/SymbolMap.h"
|
||||
|
||||
|
@ -863,9 +863,6 @@ int main(int argc, char *argv[])
|
|||
|
||||
g_mainWindow = new MainWindow(nullptr, g_Config.UseFullScreen());
|
||||
g_mainWindow->show();
|
||||
if (host == nullptr) {
|
||||
host = new QtHost(g_mainWindow);
|
||||
}
|
||||
|
||||
// TODO: Support other backends than GL, like Vulkan, in the Qt backend.
|
||||
g_Config.iGPUBackend = (int)GPUBackend::OPENGL;
|
||||
|
|
|
@ -331,17 +331,17 @@ void EmuScreen::bootGame(const Path &filename) {
|
|||
|
||||
if (PSP_CoreParameter().compat.flags().RequireBufferedRendering && g_Config.bSkipBufferEffects) {
|
||||
auto gr = GetI18NCategory("Graphics");
|
||||
host->NotifyUserMessage(gr->T("BufferedRenderingRequired", "Warning: This game requires Rendering Mode to be set to Buffered."), 15.0f);
|
||||
System_NotifyUserMessage(gr->T("BufferedRenderingRequired", "Warning: This game requires Rendering Mode to be set to Buffered."), 15.0f);
|
||||
}
|
||||
|
||||
if (PSP_CoreParameter().compat.flags().RequireBlockTransfer && g_Config.bSkipGPUReadbacks) {
|
||||
auto gr = GetI18NCategory("Graphics");
|
||||
host->NotifyUserMessage(gr->T("BlockTransferRequired", "Warning: This game requires Simulate Block Transfer Mode to be set to On."), 15.0f);
|
||||
System_NotifyUserMessage(gr->T("BlockTransferRequired", "Warning: This game requires Simulate Block Transfer Mode to be set to On."), 15.0f);
|
||||
}
|
||||
|
||||
if (PSP_CoreParameter().compat.flags().RequireDefaultCPUClock && g_Config.iLockedCPUSpeed != 0) {
|
||||
auto gr = GetI18NCategory("Graphics");
|
||||
host->NotifyUserMessage(gr->T("DefaultCPUClockRequired", "Warning: This game requires the CPU clock to be set to default."), 15.0f);
|
||||
System_NotifyUserMessage(gr->T("DefaultCPUClockRequired", "Warning: This game requires the CPU clock to be set to default."), 15.0f);
|
||||
}
|
||||
|
||||
loadingViewColor_->Divert(0xFFFFFFFF, 0.75f);
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
// Copyright (c) 2014- PPSSPP Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0 or later versions.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Core/Host.h"
|
||||
#include "Common/System/NativeApp.h"
|
||||
#include "UI/OnScreenDisplay.h"
|
||||
|
||||
class NativeHost : public Host {
|
||||
public:
|
||||
void NotifyUserMessage(const std::string &message, float duration = 1.0f, u32 color = 0x00FFFFFF, const char *id = nullptr) override {
|
||||
osm.Show(message, duration, color, -1, true, id);
|
||||
}
|
||||
};
|
|
@ -113,16 +113,12 @@
|
|||
#include "UI/EmuScreen.h"
|
||||
#include "UI/GameInfoCache.h"
|
||||
#include "UI/GPUDriverTestScreen.h"
|
||||
#include "UI/HostTypes.h"
|
||||
#include "UI/MiscScreens.h"
|
||||
#include "UI/MemStickScreen.h"
|
||||
#include "UI/OnScreenDisplay.h"
|
||||
#include "UI/RemoteISOScreen.h"
|
||||
#include "UI/Theme.h"
|
||||
|
||||
#if !defined(MOBILE_DEVICE) && defined(USING_QT_UI)
|
||||
#include "Qt/QtHost.h"
|
||||
#endif
|
||||
#if defined(USING_QT_UI)
|
||||
#include <QFontDatabase>
|
||||
#endif
|
||||
|
@ -452,12 +448,6 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch
|
|||
#endif
|
||||
g_VFS.Register("", new DirectoryReader(Path(savegame_dir)));
|
||||
|
||||
#if (defined(MOBILE_DEVICE) || !defined(USING_QT_UI)) && !PPSSPP_PLATFORM(UWP)
|
||||
if (host == nullptr) {
|
||||
host = new NativeHost();
|
||||
}
|
||||
#endif
|
||||
|
||||
g_Config.defaultCurrentDirectory = Path("/");
|
||||
g_Config.internalDataDirectory = Path(savegame_dir);
|
||||
|
||||
|
@ -1358,6 +1348,10 @@ void System_PostUIMessage(const std::string &message, const std::string &value)
|
|||
NativeMessageReceived(message.c_str(), value.c_str());
|
||||
}
|
||||
|
||||
void System_NotifyUserMessage(const std::string &message, float duration_s, u32 color, const char *id) {
|
||||
osm.Show(message, duration_s, color, -1, true, id);
|
||||
}
|
||||
|
||||
void NativeResized() {
|
||||
// NativeResized can come from any thread so we just set a flag, then process it later.
|
||||
VERBOSE_LOG(G3D, "NativeResized - setting flag");
|
||||
|
|
|
@ -84,7 +84,6 @@
|
|||
<ClInclude Include="GameSettingsScreen.h" />
|
||||
<ClInclude Include="CwCheatScreen.h" />
|
||||
<ClInclude Include="GPUDriverTestScreen.h" />
|
||||
<ClInclude Include="HostTypes.h" />
|
||||
<ClInclude Include="JoystickHistoryView.h" />
|
||||
<ClInclude Include="MainScreen.h" />
|
||||
<ClInclude Include="MemStickScreen.h" />
|
||||
|
|
|
@ -142,7 +142,6 @@
|
|||
<ClInclude Include="DisplayLayoutScreen.h">
|
||||
<Filter>Screens</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="HostTypes.h" />
|
||||
<ClInclude Include="RemoteISOScreen.h">
|
||||
<Filter>Screens</Filter>
|
||||
</ClInclude>
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include "Windows/XinputDevice.h"
|
||||
#include "NKCodeFromWindowsSystem.h"
|
||||
#include "XAudioSoundStream.h"
|
||||
#include "UWPHost.h"
|
||||
#include "UWPUtil.h"
|
||||
#include "App.h"
|
||||
|
||||
|
@ -67,7 +66,6 @@ PPSSPP_UWPMain::PPSSPP_UWPMain(App ^app, const std::shared_ptr<DX::DeviceResourc
|
|||
|
||||
net::Init();
|
||||
|
||||
host = new UWPHost();
|
||||
// Register to be notified if the Device is lost or recreated
|
||||
m_deviceResources->RegisterDeviceNotify(this);
|
||||
|
||||
|
|
|
@ -280,7 +280,6 @@
|
|||
<ClInclude Include="..\..\UI\GameScreen.h" />
|
||||
<ClInclude Include="..\..\UI\GameSettingsScreen.h" />
|
||||
<ClInclude Include="..\..\UI\GPUDriverTestScreen.h" />
|
||||
<ClInclude Include="..\..\UI\HostTypes.h" />
|
||||
<ClInclude Include="..\..\UI\InstallZipScreen.h" />
|
||||
<ClInclude Include="..\..\UI\JoystickHistoryView.h" />
|
||||
<ClInclude Include="..\..\UI\Theme.h" />
|
||||
|
|
|
@ -51,7 +51,6 @@
|
|||
<ClInclude Include="..\..\UI\GameScreen.h" />
|
||||
<ClInclude Include="..\..\UI\GameSettingsScreen.h" />
|
||||
<ClInclude Include="..\..\UI\GPUDriverTestScreen.h" />
|
||||
<ClInclude Include="..\..\UI\HostTypes.h" />
|
||||
<ClInclude Include="..\..\UI\InstallZipScreen.h" />
|
||||
<ClInclude Include="..\..\UI\MainScreen.h" />
|
||||
<ClInclude Include="..\..\UI\MemStickScreen.h" />
|
||||
|
|
|
@ -444,7 +444,6 @@
|
|||
<ClInclude Include="PPSSPP_UWPMain.h" />
|
||||
<ClInclude Include="Common\DirectXHelper.h" />
|
||||
<ClInclude Include="pch.h" />
|
||||
<ClInclude Include="UWPHost.h" />
|
||||
<ClInclude Include="UWPUtil.h" />
|
||||
<ClInclude Include="XAudioSoundStream.h" />
|
||||
</ItemGroup>
|
||||
|
@ -461,7 +460,6 @@
|
|||
<ClCompile Include="pch.cpp">
|
||||
<PrecompiledHeader>Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="UWPHost.cpp" />
|
||||
<ClCompile Include="XAudioSoundStream.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
@ -76,7 +76,6 @@
|
|||
<ClCompile Include="XAudioSoundStream.cpp" />
|
||||
<ClCompile Include="PPSSPP_UWPMain.cpp" />
|
||||
<ClCompile Include="NKCodeFromWindowsSystem.cpp" />
|
||||
<ClCompile Include="UWPHost.cpp" />
|
||||
<ClCompile Include="..\Windows\XinputDevice.cpp" />
|
||||
<ClCompile Include="..\Windows\InputDevice.cpp" />
|
||||
</ItemGroup>
|
||||
|
@ -87,7 +86,6 @@
|
|||
<ClInclude Include="XAudioSoundStream.h" />
|
||||
<ClInclude Include="PPSSPP_UWPMain.h" />
|
||||
<ClInclude Include="NKCodeFromWindowsSystem.h" />
|
||||
<ClInclude Include="UWPHost.h" />
|
||||
<ClInclude Include="..\Windows\XinputDevice.h" />
|
||||
<ClInclude Include="UWPUtil.h" />
|
||||
<ClInclude Include="..\Windows\InputDevice.h" />
|
||||
|
@ -492,6 +490,17 @@
|
|||
<None Include="Content\debugger\static\media\*.svg">
|
||||
<Filter>Content\debugger\static\media</Filter>
|
||||
</None>
|
||||
<None Include="Content\debugger\static\css\*.css" />
|
||||
<None Include="Content\debugger\static\css\*.css" />
|
||||
<None Include="Content\debugger\static\css\*.map" />
|
||||
<None Include="Content\debugger\static\css\*.map" />
|
||||
<None Include="Content\debugger\static\js\*.js" />
|
||||
<None Include="Content\debugger\static\js\*.js" />
|
||||
<None Include="Content\debugger\static\js\*.js" />
|
||||
<None Include="Content\debugger\static\js\*.map" />
|
||||
<None Include="Content\debugger\static\js\*.map" />
|
||||
<None Include="Content\debugger\static\js\*.map" />
|
||||
<None Include="Content\debugger\static\media\*.svg" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="Content\gamecontrollerdb.txt">
|
||||
|
@ -500,6 +509,7 @@
|
|||
<Text Include="Content\debugger\static\js\*.txt">
|
||||
<Filter>Content\debugger\static\js</Filter>
|
||||
</Text>
|
||||
<Text Include="Content\debugger\static\js\*.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Font Include="Content\Roboto-Condensed.ttf">
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
// Copyright (c) 2012- PPSSPP Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0 or later versions.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#include "ppsspp_config.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "Common/System/System.h"
|
||||
|
||||
#include "UI/OnScreenDisplay.h"
|
||||
|
||||
#include "UWP/UWPHost.h"
|
||||
|
||||
UWPHost::UWPHost() {
|
||||
}
|
||||
|
||||
UWPHost::~UWPHost() {
|
||||
|
||||
}
|
||||
|
||||
void UWPHost::NotifyUserMessage(const std::string &message, float duration, u32 color, const char *id) {
|
||||
osm.Show(message, duration, color, -1, true, id);
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "Core/Host.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
class UWPHost : public Host {
|
||||
public:
|
||||
UWPHost();
|
||||
~UWPHost();
|
||||
|
||||
void NotifyUserMessage(const std::string &message, float duration = 1.0f, u32 color = 0x00FFFFFF, const char *id = nullptr) override;
|
||||
};
|
|
@ -155,7 +155,7 @@ void MainThreadFunc() {
|
|||
// We'll start up a separate thread we'll call Emu
|
||||
SetCurrentThreadName(useEmuThread ? "Render" : "Emu");
|
||||
|
||||
host = new WindowsHost();
|
||||
SetConsolePosition();
|
||||
|
||||
System_SetWindowTitle("");
|
||||
|
||||
|
|
|
@ -22,12 +22,12 @@
|
|||
#include "Common/GPU/OpenGL/GLFeatures.h"
|
||||
#include "Common/GPU/thin3d_create.h"
|
||||
#include "Common/GPU/OpenGL/GLRenderManager.h"
|
||||
#include "Common/System/System.h"
|
||||
#include "GL/gl.h"
|
||||
#include "GL/wglew.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/ConfigValues.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Common/Data/Encoding/Utf8.h"
|
||||
#include "Common/Data/Text/I18n.h"
|
||||
#include "UI/OnScreenDisplay.h"
|
||||
|
@ -422,7 +422,7 @@ bool WindowsGLContext::InitFromRenderThread(std::string *error_message) {
|
|||
}
|
||||
|
||||
draw_->SetErrorCallback([](const char *shortDesc, const char *details, void *userdata) {
|
||||
host->NotifyUserMessage(details, 5.0, 0xFFFFFFFF, "error_callback");
|
||||
System_NotifyUserMessage(details, 5.0, 0xFFFFFFFF, "error_callback");
|
||||
}, nullptr);
|
||||
|
||||
// These are auto-reset events.
|
||||
|
|
|
@ -731,16 +731,6 @@
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Qt\QtHost.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Qt\QtMain.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
|
@ -831,16 +821,6 @@
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\UWP\UWPHost.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\UWP\XAudioSoundStream.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
|
@ -1273,16 +1253,6 @@
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Qt\QtHost.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Qt\QtMain.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
|
@ -1393,16 +1363,6 @@
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\UWP\UWPHost.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\UWP\UWPUtil.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
|
|
|
@ -184,9 +184,6 @@
|
|||
<ClCompile Include="GPU\D3D11Context.cpp">
|
||||
<Filter>Windows\System</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Qt\QtHost.cpp">
|
||||
<Filter>Other Platforms\Qt</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="WindowsAudio.cpp">
|
||||
<Filter>Windows\System</Filter>
|
||||
</ClCompile>
|
||||
|
@ -244,9 +241,6 @@
|
|||
<ClCompile Include="..\SDL\SDLVulkanGraphicsContext.cpp">
|
||||
<Filter>Other Platforms\SDL</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\UWP\UWPHost.cpp">
|
||||
<Filter>Other Platforms\UWP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\UWP\NKCodeFromWindowsSystem.cpp">
|
||||
<Filter>Other Platforms\UWP</Filter>
|
||||
</ClCompile>
|
||||
|
@ -402,9 +396,6 @@
|
|||
<ClInclude Include="GPU\D3D11Context.h">
|
||||
<Filter>Windows\System</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Qt\QtHost.h">
|
||||
<Filter>Other Platforms\Qt</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="WindowsAudio.h">
|
||||
<Filter>Windows\System</Filter>
|
||||
</ClInclude>
|
||||
|
@ -508,9 +499,6 @@
|
|||
<ClInclude Include="..\SDL\SDLVulkanGraphicsContext.h">
|
||||
<Filter>Other Platforms\SDL</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\UWP\UWPHost.h">
|
||||
<Filter>Other Platforms\UWP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\UWP\NKCodeFromWindowsSystem.h">
|
||||
<Filter>Other Platforms\UWP</Filter>
|
||||
</ClInclude>
|
||||
|
@ -838,4 +826,4 @@
|
|||
<Filter>Other Platforms\SDL</Filter>
|
||||
</Text>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
|
@ -19,25 +19,11 @@
|
|||
|
||||
#include <algorithm>
|
||||
|
||||
// For shell links
|
||||
#include "Common/CommonWindows.h"
|
||||
#include "winnls.h"
|
||||
#include "shobjidl.h"
|
||||
#include "objbase.h"
|
||||
#include "objidl.h"
|
||||
#include "shlguid.h"
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4091) // workaround bug in VS2015 headers
|
||||
#include "shlobj.h"
|
||||
#pragma warning(pop)
|
||||
|
||||
// native stuff
|
||||
#include "Common/System/Display.h"
|
||||
#include "Common/System/NativeApp.h"
|
||||
#include "Common/Input/InputState.h"
|
||||
#include "Common/Input/KeyCodes.h"
|
||||
#include "Common/Data/Encoding/Utf8.h"
|
||||
#include "Common/File/DirListing.h"
|
||||
#include "Common/StringUtils.h"
|
||||
|
||||
#include "Core/Core.h"
|
||||
|
@ -55,10 +41,6 @@
|
|||
#include "Windows/WindowsHost.h"
|
||||
#include "Windows/MainWindow.h"
|
||||
|
||||
#include "Windows/Debugger/DebuggerShared.h"
|
||||
#include "Windows/Debugger/Debugger_Disasm.h"
|
||||
#include "Windows/Debugger/Debugger_MemoryDlg.h"
|
||||
|
||||
#ifndef _M_ARM
|
||||
#include "Windows/DinputDevice.h"
|
||||
#endif
|
||||
|
@ -66,22 +48,14 @@
|
|||
|
||||
#include "Windows/main.h"
|
||||
|
||||
static BOOL PostDialogMessage(Dialog *dialog, UINT message, WPARAM wParam = 0, LPARAM lParam = 0) {
|
||||
return PostMessage(dialog->GetDlgHandle(), message, wParam, lParam);
|
||||
}
|
||||
|
||||
WindowsHost::WindowsHost() {
|
||||
SetConsolePosition();
|
||||
}
|
||||
|
||||
void WindowsHost::SetConsolePosition() {
|
||||
void SetConsolePosition() {
|
||||
HWND console = GetConsoleWindow();
|
||||
if (console != NULL && g_Config.iConsoleWindowX != -1 && g_Config.iConsoleWindowY != -1) {
|
||||
SetWindowPos(console, NULL, g_Config.iConsoleWindowX, g_Config.iConsoleWindowY, 0, 0, SWP_NOSIZE | SWP_NOZORDER);
|
||||
}
|
||||
}
|
||||
|
||||
void WindowsHost::UpdateConsolePosition() {
|
||||
void UpdateConsolePosition() {
|
||||
RECT rc;
|
||||
HWND console = GetConsoleWindow();
|
||||
if (console != NULL && GetWindowRect(console, &rc) && !IsIconic(console)) {
|
||||
|
@ -153,7 +127,3 @@ void WindowsInputManager::PollControllers() {
|
|||
HLEPlugins::PluginDataAxis[JOYSTICK_AXIS_MOUSE_REL_X] = mouseDeltaX_;
|
||||
HLEPlugins::PluginDataAxis[JOYSTICK_AXIS_MOUSE_REL_Y] = mouseDeltaY_;
|
||||
}
|
||||
|
||||
void WindowsHost::NotifyUserMessage(const std::string &message, float duration, u32 color, const char *id) {
|
||||
osm.Show(message, duration, color, -1, true, id);
|
||||
}
|
||||
|
|
|
@ -19,22 +19,10 @@
|
|||
#include <memory>
|
||||
|
||||
#include "Common/CommonWindows.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Windows/InputDevice.h"
|
||||
|
||||
class WindowsHost : public Host {
|
||||
public:
|
||||
WindowsHost();
|
||||
~WindowsHost() {
|
||||
UpdateConsolePosition();
|
||||
}
|
||||
|
||||
void NotifyUserMessage(const std::string &message, float duration = 1.0f, u32 color = 0x00FFFFFF, const char *id = nullptr) override;
|
||||
|
||||
private:
|
||||
void SetConsolePosition();
|
||||
void UpdateConsolePosition();
|
||||
};
|
||||
void SetConsolePosition();
|
||||
void UpdateConsolePosition();
|
||||
|
||||
class WindowsInputManager {
|
||||
public:
|
||||
|
|
|
@ -92,7 +92,6 @@ struct JNIEnv {};
|
|||
#include "Core/System.h"
|
||||
#include "Core/HLE/sceUsbCam.h"
|
||||
#include "Core/HLE/sceUsbGps.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Common/CPUDetect.h"
|
||||
#include "Common/Log.h"
|
||||
#include "UI/GameInfoCache.h"
|
||||
|
@ -947,7 +946,7 @@ extern "C" bool Java_org_ppsspp_ppsspp_NativeRenderer_displayInit(JNIEnv * env,
|
|||
}
|
||||
|
||||
graphicsContext->GetDrawContext()->SetErrorCallback([](const char *shortDesc, const char *details, void *userdata) {
|
||||
host->NotifyUserMessage(details, 5.0, 0xFFFFFFFF, "error_callback");
|
||||
System_NotifyUserMessage(details, 5.0, 0xFFFFFFFF, "error_callback");
|
||||
}, nullptr);
|
||||
|
||||
EmuThreadStart();
|
||||
|
@ -963,7 +962,7 @@ extern "C" bool Java_org_ppsspp_ppsspp_NativeRenderer_displayInit(JNIEnv * env,
|
|||
}
|
||||
|
||||
graphicsContext->GetDrawContext()->SetErrorCallback([](const char *shortDesc, const char *details, void *userdata) {
|
||||
host->NotifyUserMessage(details, 5.0, 0xFFFFFFFF, "error_callback");
|
||||
System_NotifyUserMessage(details, 5.0, 0xFFFFFFFF, "error_callback");
|
||||
}, nullptr);
|
||||
|
||||
graphicsContext->ThreadStart();
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit b34f619e1c85810dcb3c578107d2e48ba4ee2b37
|
||||
Subproject commit 77551c429f86c0e077f26552b7c1c0f12a9f235e
|
|
@ -116,6 +116,7 @@ bool System_GetPropertyBool(SystemProperty prop) {
|
|||
}
|
||||
void System_Notify(SystemNotification notification) {}
|
||||
void System_PostUIMessage(const std::string &message, const std::string ¶m) {}
|
||||
void System_NotifyUserMessage(const std::string &message, float duration, u32 color, const char *id) {}
|
||||
bool System_MakeRequest(SystemRequestType type, int requestId, const std::string ¶m1, const std::string ¶m2, int param3) { return false; }
|
||||
void System_InputBoxGetString(const std::string &title, const std::string &defaultValue, std::function<void(bool, const std::string &)> cb) { cb(false, ""); }
|
||||
void System_AskForPermission(SystemPermission permission) {}
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
#include "Core/CoreParameter.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/Debugger/SymbolMap.h"
|
||||
|
||||
class HeadlessHost : public Host {
|
||||
public:
|
||||
|
|
|
@ -202,7 +202,7 @@ extern float g_safeInsetBottom;
|
|||
graphicsContext = new IOSGraphicsContext();
|
||||
|
||||
graphicsContext->GetDrawContext()->SetErrorCallback([](const char *shortDesc, const char *details, void *userdata) {
|
||||
host->NotifyUserMessage(details, 5.0, 0xFFFFFFFF, "error_callback");
|
||||
System_NotifyUserMessage(details, 5.0, 0xFFFFFFFF, "error_callback");
|
||||
}, nullptr);
|
||||
|
||||
graphicsContext->ThreadStart();
|
||||
|
|
|
@ -1864,6 +1864,7 @@ void System_Notify(SystemNotification notification) {
|
|||
}
|
||||
bool System_MakeRequest(SystemRequestType type, int requestId, const std::string ¶m1, const std::string ¶m2, int param3) { return false; }
|
||||
void System_PostUIMessage(const std::string &message, const std::string ¶m) {}
|
||||
void System_NotifyUserMessage(const std::string &message, float duration, u32 color, const char *id) {}
|
||||
void NativeUpdate() {}
|
||||
void NativeRender(GraphicsContext *graphicsContext) {}
|
||||
void NativeResized() {}
|
||||
|
|
|
@ -89,6 +89,7 @@ bool System_GetPropertyBool(SystemProperty prop) {
|
|||
}
|
||||
void System_Notify(SystemNotification notification) {}
|
||||
void System_PostUIMessage(const std::string &message, const std::string ¶m) {}
|
||||
void System_NotifyUserMessage(const std::string &message, float duration, u32 color, const char *id) {}
|
||||
void System_AudioGetDebugStats(char *buf, size_t bufSize) { if (buf) buf[0] = '\0'; }
|
||||
void System_AudioClear() {}
|
||||
void System_AudioPushSamples(const s32 *audio, int numSamples) {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue