Merge pull request #33 from OpenEmu/incomplete1.12

PPSSPP 1.12.2 update
This commit is contained in:
C.W. Betts
2021-10-12 01:08:16 -06:00
committed by GitHub
5 changed files with 651 additions and 135 deletions
+1 -1
View File
@@ -33,7 +33,7 @@
<string>openemu.system.psp</string>
</array>
<key>SUEnableAutomaticChecks</key>
<string>1</string>
<true/>
<key>SUFeedURL</key>
<string>https://raw.github.com/OpenEmu/OpenEmu-Update/master/ppsspp_appcast.xml</string>
</dict>
+7 -5
View File
@@ -31,12 +31,14 @@
#include "Math/fast/fast_math.h"
#include "Common/LogManager.h"
#include "Common/CPUDetect.h"
#include "Core/Core.h"
#include "Core/CoreTiming.h"
#include "Core/Host.h"
#include "Core/System.h"
#include "Core/HLE/__sceAudio.h"
#include "Core/ThreadPools.h"
#include "File/VFS/VFS.h"
#include "File/VFS/AssetReader.h"
@@ -115,7 +117,7 @@ namespace OpenEmuCoreThread {
}
static void EmuThreadFunc() {
setCurrentThreadName("Emu");
SetCurrentThreadName("Emu");
while (true) {
switch ((EmuThreadState)emuThreadState) {
@@ -258,14 +260,14 @@ int NativeMix(short *audio, int num_samples)
void NativeInit(int argc, const char *argv[], const char *savegame_directory, const char *external_directory, const char *cache_directory)
{
VFSRegister("", new DirectoryAssetReader("assets/"));
VFSRegister("", new DirectoryAssetReader(external_directory));
VFSRegister("", new DirectoryAssetReader(Path("assets/")));
VFSRegister("", new DirectoryAssetReader(Path(external_directory)));
g_threadManager.Init(cpu_info.num_cores, cpu_info.logical_cpu_count);
if (host == nullptr) {
host = new NativeHost();
}
g_Config.externalDirectory = external_directory;
logger = new AndroidLogger();
File diff suppressed because it is too large Load Diff
+19 -14
View File
@@ -83,6 +83,10 @@ void NativeSetThreadState(OpenEmuCoreThread::EmuThreadState threadState);
CoreParameter _coreParam;
bool _isInitialized;
bool _shouldReset;
//Hack for analog stick.
float x;
float y;
OpenEmuGLContext *OEgraphicsContext;
}
@@ -123,9 +127,9 @@ PPSSPPGameCore *_current = 0;
}
g_Config.bEnableLogging = true;
g_Config.iUnthrottleMode = (int)UnthrottleMode::CONTINUOUS;
g_Config.iFastForwardMode = (int)FastForwardMode::CONTINUOUS;
g_Config.bMemStickInserted = true;
g_Config.iGlobalVolume = VOLUME_MAX - 1;
g_Config.iGlobalVolume = VOLUME_FULL - 1;
g_Config.iAltSpeedVolume = -1;
g_Config.bEnableSound = true;
g_Config.iCwCheatRefreshRate = 60;
@@ -141,11 +145,11 @@ PPSSPPGameCore *_current = 0;
// Force a trailing forward slash that PPSSPP requires
NSString *directoryString = [supportDirectoryURL.path stringByAppendingString:@"/"];
//NSURL *directoryURL3 = [supportDirectoryURL URLByAppendingPathComponent:@"/" isDirectory:YES];
g_Config.currentDirectory = directoryString.fileSystemRepresentation;
g_Config.externalDirectory = directoryString.fileSystemRepresentation;
g_Config.memStickDirectory = directoryString.fileSystemRepresentation;
g_Config.flash0Directory = directoryString.fileSystemRepresentation;
g_Config.internalDataDirectory = directoryString.fileSystemRepresentation;
g_Config.currentDirectory = Path(directoryString.fileSystemRepresentation);
// g_Config.externalDirectory = directoryString.fileSystemRepresentation;
g_Config.memStickDirectory = Path(directoryString.fileSystemRepresentation);
g_Config.flash0Directory = Path(directoryString.fileSystemRepresentation);
g_Config.internalDataDirectory = Path(directoryString.fileSystemRepresentation);
g_Config.iGPUBackend = (int)GPUBackend::OPENGL;
g_Config.bHideStateWarnings = false;
g_Config.iLanguage = PSP_SYSTEMPARAM_LANGUAGE_ENGLISH;
@@ -153,8 +157,8 @@ PPSSPPGameCore *_current = 0;
_coreParam.cpuCore = CPUCore::JIT;
_coreParam.gpuCore = GPUCORE_GLES;
_coreParam.enableSound = true;
_coreParam.fileToStart = romURL.fileSystemRepresentation;
_coreParam.mountIso = "";
_coreParam.fileToStart = Path(romURL.fileSystemRepresentation);
_coreParam.mountIso = Path();
_coreParam.startBreak = false;
_coreParam.printfEmuLog = false;
_coreParam.headLess = false;
@@ -228,7 +232,7 @@ PPSSPPGameCore *_current = 0;
} else {
//If Fast forward rate is detected, unthrottle the rndering
PSP_CoreParameter().unthrottle = (self.rate > 1) ? true : false;
PSP_CoreParameter().fastForward = (self.rate > 1) ? true : false;
//Let PPSSPP Core run a loop and return
UpdateRunLoop();
@@ -326,12 +330,12 @@ static void _OELoadStateCallback(SaveState::Status status, std::string message,
- (void)saveStateToFileAtPath:(NSString *)fileName completionHandler:(void (^)(BOOL, NSError *))block
{
[self beginPausedExecution];
SaveState::Save(fileName.fileSystemRepresentation,0, _OESaveStateCallback, (__bridge_retained void *)[block copy]);
SaveState::Save(Path(fileName.fileSystemRepresentation),0, _OESaveStateCallback, (__bridge_retained void *)[block copy]);
}
- (void)loadStateFromFileAtPath:(NSString *)fileName completionHandler:(void (^)(BOOL, NSError *))block
{
SaveState::Load(fileName.fileSystemRepresentation, 0,_OELoadStateCallback, (__bridge_retained void *)[block copy]);
SaveState::Load(Path(fileName.fileSystemRepresentation), 0,_OELoadStateCallback, (__bridge_retained void *)[block copy]);
if(_isInitialized){
//We need to pause our EmuThread so we don't try to process the save state in the middle of a Frame Render
NativeSetThreadState(OpenEmuCoreThread::EmuThreadState::PAUSE_REQUESTED);
@@ -347,9 +351,10 @@ const int buttonMap[] = { CTRL_UP, CTRL_DOWN, CTRL_LEFT, CTRL_RIGHT, 0, 0, 0, 0,
- (oneway void)didMovePSPJoystickDirection:(OEPSPButton)button withValue:(CGFloat)value forPlayer:(NSUInteger)player
{
if(button == OEPSPAnalogUp || button == OEPSPAnalogDown)
__CtrlSetAnalogY(button == OEPSPAnalogUp ? value : -value);
y = (button == OEPSPAnalogUp ? value : -value);
else
__CtrlSetAnalogX(button == OEPSPAnalogRight ? value : -value);
x = (button == OEPSPAnalogRight ? value : -value);
__CtrlSetAnalogXY(0, x, y);
}
- (oneway void)didPushPSPButton:(OEPSPButton)button forPlayer:(NSUInteger)player
+1 -1
Submodule ppsspp updated: acd496b6c2...e91b8af27a