mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Get it running on Android again
This commit is contained in:
parent
1556234825
commit
0f973a3276
7 changed files with 17 additions and 11 deletions
|
@ -762,7 +762,6 @@ set(NativeAppSource
|
|||
UI/TouchControlLayoutScreen.cpp
|
||||
UI/TouchControlVisibilityScreen.cpp
|
||||
UI/GamepadEmu.cpp
|
||||
UI/UIShader.cpp
|
||||
UI/OnScreenDisplay.cpp
|
||||
UI/ControlMappingScreen.cpp
|
||||
UI/Store.cpp
|
||||
|
|
|
@ -152,19 +152,21 @@ void UpdateRunLoop() {
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(USING_WIN_UI)
|
||||
|
||||
void GPU_SwapBuffers() {
|
||||
switch (g_Config.iGPUBackend) {
|
||||
case GPU_BACKEND_OPENGL:
|
||||
GL_SwapBuffers();
|
||||
break;
|
||||
#ifdef _WIN32
|
||||
case GPU_BACKEND_DIRECT3D9:
|
||||
D3D9_SwapBuffers();
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void Core_RunLoop() {
|
||||
while ((GetUIState() != UISTATE_INGAME || !PSP_IsInited()) && GetUIState() != UISTATE_EXIT) {
|
||||
time_update();
|
||||
|
|
|
@ -1670,15 +1670,15 @@ u32 sceKernelLoadModule(const char *name, u32 flags, u32 optionAddr)
|
|||
if (optionAddr) {
|
||||
lmoption = (SceKernelLMOption *)Memory::GetPointer(optionAddr);
|
||||
if (lmoption->position < PSP_SMEM_Low || lmoption->position > PSP_SMEM_HighAligned) {
|
||||
ERROR_LOG_REPORT(LOADER, "sceKernelLoadModule(%s): invalid position", name, lmoption->position);
|
||||
ERROR_LOG_REPORT(LOADER, "sceKernelLoadModule(%s): invalid position (%i)", name, (int)lmoption->position);
|
||||
return SCE_KERNEL_ERROR_ILLEGAL_MEMBLOCKTYPE;
|
||||
}
|
||||
if (lmoption->position == PSP_SMEM_LowAligned || lmoption->position == PSP_SMEM_HighAligned) {
|
||||
ERROR_LOG_REPORT(LOADER, "sceKernelLoadModule(%s): invalid position (aligned)", name, lmoption->position);
|
||||
ERROR_LOG_REPORT(LOADER, "sceKernelLoadModule(%s): invalid position (aligned)", name);
|
||||
return SCE_KERNEL_ERROR_ILLEGAL_ALIGNMENT_SIZE;
|
||||
}
|
||||
if (lmoption->position == PSP_SMEM_Addr) {
|
||||
ERROR_LOG_REPORT(LOADER, "sceKernelLoadModule(%s): invalid position (fixed)", name, lmoption->position);
|
||||
ERROR_LOG_REPORT(LOADER, "sceKernelLoadModule(%s): invalid position (fixed)", name);
|
||||
return SCE_KERNEL_ERROR_MEMBLOCK_ALLOC_FAILED;
|
||||
}
|
||||
WARN_LOG_REPORT(LOADER, "sceKernelLoadModule: unsupported options size=%08x, flags=%08x, pos=%d, access=%d, data=%d, text=%d", lmoption->size, lmoption->flags, lmoption->position, lmoption->access, lmoption->mpiddata, lmoption->mpidtext);
|
||||
|
|
|
@ -394,14 +394,12 @@ void LogoScreen::render() {
|
|||
UIScreen::render();
|
||||
UIContext &dc = *screenManager()->getUIContext();
|
||||
|
||||
int error = glGetError();
|
||||
const Bounds &bounds = dc.GetBounds();
|
||||
|
||||
float xres = dc.GetBounds().w;
|
||||
float yres = dc.GetBounds().h;
|
||||
|
||||
dc.Begin();
|
||||
error = glGetError();
|
||||
float t = (float)frames_ / 60.0f;
|
||||
|
||||
float alpha = t;
|
||||
|
|
|
@ -467,11 +467,18 @@ void NativeInit(int argc, const char *argv[],
|
|||
void NativeInitGraphics() {
|
||||
FPU_SetFastMode();
|
||||
|
||||
#ifndef _WIN32
|
||||
// Force backend to GL
|
||||
g_Config.iGPUBackend = GPU_BACKEND_OPENGL;
|
||||
#endif
|
||||
|
||||
if (g_Config.iGPUBackend == GPU_BACKEND_OPENGL) {
|
||||
thin3d = T3DCreateGLContext();
|
||||
CheckGLExtensions();
|
||||
} else {
|
||||
#ifdef _WIN32
|
||||
thin3d = D3D9_CreateThin3DContext();
|
||||
#endif
|
||||
}
|
||||
|
||||
ui_draw2d.SetAtlas(&ui_atlas);
|
||||
|
@ -688,9 +695,11 @@ void NativeRender() {
|
|||
glstate.colorMask.set(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
||||
glstate.Restore();
|
||||
} else {
|
||||
#ifdef _WIN32
|
||||
DX9::dxstate.depthWrite.set(true);
|
||||
DX9::dxstate.colorMask.set(true, true, true, true);
|
||||
DX9::dxstate.Restore();
|
||||
#endif
|
||||
}
|
||||
|
||||
thin3d->Clear(T3DClear::COLOR | T3DClear::DEPTH | T3DClear::STENCIL, 0xFF000000, 0.0f, 0);
|
||||
|
@ -901,7 +910,6 @@ void NativeResized() {
|
|||
#if defined(__APPLE__) && !defined(USING_QT_UI)
|
||||
static int dp_xres_old=dp_xres;
|
||||
if (dp_xres != dp_xres_old) {
|
||||
UIShader_Init();
|
||||
uiTexture->Load("ui_atlas.zim");
|
||||
dp_xres_old = dp_xres;
|
||||
}
|
||||
|
|
|
@ -286,7 +286,6 @@ LOCAL_SRC_FILES := \
|
|||
$(SRC)/UI/MainScreen.cpp \
|
||||
$(SRC)/UI/MiscScreens.cpp \
|
||||
$(SRC)/UI/Store.cpp \
|
||||
$(SRC)/UI/UIShader.cpp \
|
||||
$(SRC)/UI/GamepadEmu.cpp \
|
||||
$(SRC)/UI/GameInfoCache.cpp \
|
||||
$(SRC)/UI/GameScreen.cpp \
|
||||
|
|
2
native
2
native
|
@ -1 +1 @@
|
|||
Subproject commit 1401de50dca62f9084edbf50ff1b09f6ca06d8d4
|
||||
Subproject commit 7708558c2f247dd4e8d874df9a05c414c3739bc8
|
Loading…
Add table
Reference in a new issue