mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Provide for GPU init failure, kill a warning.
This commit is contained in:
parent
657f7f1a2d
commit
bbf714c361
3 changed files with 14 additions and 5 deletions
|
@ -271,7 +271,11 @@ bool PSP_Init(const CoreParameter &coreParam, std::string *error_string) {
|
||||||
bool success = coreParameter.fileToStart != "";
|
bool success = coreParameter.fileToStart != "";
|
||||||
*error_string = coreParameter.errorString;
|
*error_string = coreParameter.errorString;
|
||||||
if (success) {
|
if (success) {
|
||||||
GPU_Init();
|
success = GPU_Init();
|
||||||
|
if (!success) {
|
||||||
|
PSP_Shutdown();
|
||||||
|
*error_string = "Unable to initialize rendering engine.";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ GPUStateCache gstate_c;
|
||||||
GPUInterface *gpu;
|
GPUInterface *gpu;
|
||||||
GPUStatistics gpuStats;
|
GPUStatistics gpuStats;
|
||||||
|
|
||||||
void GPU_Init() {
|
bool GPU_Init() {
|
||||||
switch (PSP_CoreParameter().gpuCore) {
|
switch (PSP_CoreParameter().gpuCore) {
|
||||||
case GPU_NULL:
|
case GPU_NULL:
|
||||||
gpu = new NullGPU();
|
gpu = new NullGPU();
|
||||||
|
@ -37,12 +37,17 @@ void GPU_Init() {
|
||||||
case GPU_GLES:
|
case GPU_GLES:
|
||||||
gpu = new GLES_GPU();
|
gpu = new GLES_GPU();
|
||||||
break;
|
break;
|
||||||
#ifndef __SYMBIAN32__
|
|
||||||
case GPU_SOFTWARE:
|
case GPU_SOFTWARE:
|
||||||
|
#ifndef __SYMBIAN32__
|
||||||
gpu = new SoftGPU();
|
gpu = new SoftGPU();
|
||||||
break;
|
|
||||||
#endif
|
#endif
|
||||||
|
break;
|
||||||
|
case GPU_DIRECTX9:
|
||||||
|
// TODO
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return gpu != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPU_Shutdown() {
|
void GPU_Shutdown() {
|
||||||
|
|
|
@ -490,7 +490,7 @@ struct GPUStatistics {
|
||||||
int numFBOs;
|
int numFBOs;
|
||||||
};
|
};
|
||||||
|
|
||||||
void GPU_Init();
|
bool GPU_Init();
|
||||||
void GPU_Shutdown();
|
void GPU_Shutdown();
|
||||||
|
|
||||||
void InitGfxState();
|
void InitGfxState();
|
||||||
|
|
Loading…
Add table
Reference in a new issue