psphawk: clean up some logging stuff. fix upsidedown image. redirect special PSP paths to PSP/ subfolder (still not much control over them, but at least they wont be shatting all over the place)
This commit is contained in:
parent
5ec0cf2831
commit
c8577fc361
|
@ -80,6 +80,8 @@ namespace BizHawk.Emulation.Consoles.Sony.PSP
|
|||
PPSSPPDll.die();
|
||||
logcallback = null;
|
||||
disposed = true;
|
||||
LogFlush();
|
||||
Console.WriteLine("PSP Core Disposed.");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -88,6 +90,7 @@ namespace BizHawk.Emulation.Consoles.Sony.PSP
|
|||
public void FrameAdvance(bool render, bool rendersound = true)
|
||||
{
|
||||
PPSSPPDll.advance();
|
||||
LogFlush();
|
||||
}
|
||||
|
||||
public int Frame
|
||||
|
|
Binary file not shown.
|
@ -152,7 +152,7 @@ CoreParameter &PSP_CoreParameter()
|
|||
|
||||
|
||||
void GetSysDirectories(std::string &memstickpath, std::string &flash0path) {
|
||||
#ifdef _WIN32
|
||||
#if 0 //def _WIN32
|
||||
char path_buffer[_MAX_PATH], drive[_MAX_DRIVE] ,dir[_MAX_DIR], file[_MAX_FNAME], ext[_MAX_EXT];
|
||||
char memstickpath_buf[_MAX_PATH];
|
||||
char flash0path_buf[_MAX_PATH];
|
||||
|
|
|
@ -204,6 +204,9 @@ BZEXPORT int BZAPI init(const char *fn, void (BZAPI* logcallback)(char, const ch
|
|||
g_Config.iButtonPreference = PSP_SYSTEMPARAM_BUTTON_CROSS;
|
||||
g_Config.iLockParentalLevel = 9;
|
||||
|
||||
g_Config.flashDirectory = "PSP/flash0/";
|
||||
g_Config.memCardDirectory = "PSP/memstick/";
|
||||
|
||||
if (!PSP_Init(coreParameter, &error_string))
|
||||
{
|
||||
logcallback('!', "PSP_Init() failed\n");
|
||||
|
|
|
@ -95,10 +95,24 @@ void WindowsHeadlessHost::SendDebugOutput(const std::string &output)
|
|||
OutputDebugString(output.c_str());
|
||||
}
|
||||
|
||||
void WindowsHeadlessHost::SendBackBuffer(void *dest)
|
||||
void WindowsHeadlessHost::SendBackBuffer(void *_dest)
|
||||
{
|
||||
int *dest = (int *)_dest;
|
||||
glReadBuffer(GL_BACK);
|
||||
glReadPixels(0, 0, 480, 272, GL_BGRA, GL_UNSIGNED_BYTE, dest);
|
||||
|
||||
// vflip
|
||||
int buff[480];
|
||||
for (int j = 0; j < 272 / 2; j++)
|
||||
{
|
||||
int *l1 = dest + 480 * j;
|
||||
int *l2 = dest + 480 * (271 - j);
|
||||
int s = 480 * 4;
|
||||
|
||||
memcpy(buff, l1, s);
|
||||
memcpy(l1, l2, s);
|
||||
memcpy(l2, buff, s);
|
||||
}
|
||||
}
|
||||
|
||||
void WindowsHeadlessHost::SendDebugScreenshot(const u8 *pixbuf, u32 w, u32 h)
|
||||
|
|
Loading…
Reference in New Issue