Skip to content

Commit

Permalink
Comment improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Dec 28, 2022
1 parent 67cba83 commit 10c0b3f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Common/GPU/OpenGL/GLFeatures.cpp
Expand Up @@ -135,7 +135,7 @@ bool CheckGLExtensions() {
return true;
}

memset(&gl_extensions, 0, sizeof(gl_extensions));
gl_extensions = {};
gl_extensions.IsCoreContext = useCoreContext;

const char *renderer = (const char *)glGetString(GL_RENDERER);
Expand Down
2 changes: 1 addition & 1 deletion Common/GPU/OpenGL/GLFeatures.h
Expand Up @@ -30,7 +30,7 @@ enum {
// Extensions to look at using:
// GL_NV_map_buffer_range (same as GL_ARB_map_buffer_range ?)

// WARNING: This gets memset-d - so no strings please
// WARNING: This gets memset-d - so no strings or other non-POD types please
// TODO: Rename this GLFeatures or something.
struct GLExtensions {
int ver[3];
Expand Down
8 changes: 6 additions & 2 deletions android/jni/app-android.cpp
Expand Up @@ -655,7 +655,7 @@ extern "C" void Java_org_ppsspp_ppsspp_NativeApp_init
EARLY_LOG("NativeApp.init() -- begin");
PROFILE_INIT();

std::lock_guard<std::mutex> guard(renderLock);
std::lock_guard<std::mutex> guard(renderLock); // Note: This is held for the rest of this function - intended?
renderer_inited = false;
androidVersion = jAndroidVersion;
deviceType = jdeviceType;
Expand Down Expand Up @@ -875,6 +875,7 @@ extern "C" void Java_org_ppsspp_ppsspp_NativeApp_shutdown(JNIEnv *, jclass) {
}

// JavaEGL. This doesn't get called on the Vulkan path.
// This gets called from onSurfaceCreated.
extern "C" bool Java_org_ppsspp_ppsspp_NativeRenderer_displayInit(JNIEnv * env, jobject obj) {
_assert_(useCPUThread);

Expand All @@ -884,7 +885,10 @@ extern "C" bool Java_org_ppsspp_ppsspp_NativeRenderer_displayInit(JNIEnv * env,
// We should be running on the render thread here.
std::string errorMessage;
if (renderer_inited) {
// Would be really nice if we could get something on the GL thread immediately when shutting down.
// Would be really nice if we could get something on the GL thread immediately when shutting down,
// but the only mechanism for handling lost devices seems to be that onSurfaceCreated is called again,
// which ends up calling displayInit.

INFO_LOG(G3D, "NativeApp.displayInit() restoring");
EmuThreadStop("displayInit");
graphicsContext->BeginAndroidShutdown();
Expand Down

0 comments on commit 10c0b3f

Please sign in to comment.