Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android: Add both a lost and restore phase #8968

Merged
merged 4 commits into from
Sep 11, 2016

Conversation

unknownbrackets
Copy link
Collaborator

@unknownbrackets unknownbrackets commented Sep 11, 2016

It seemed like you may have thought of this at one point. Here's my theory on what's happening:

  1. gl_lost() runs.
  2. Some GLLost() creates an object (since it's really "restore".)
  3. Some other GLLost() deletes an object (which just happens - unlucky - to be a recently created object.)
  4. gl_lost() finishes, but some objects are broken now.

So the goal here is to break those up, and clear/delete things in lost, but recreate on restore. I don't think it really adds much complexity anywhere.

Could help #8912 or #8906.

-[Unknown]

The enum type was not hurting anyone, since the values were the same.
@sum2012
Copy link
Collaborator

sum2012 commented Sep 11, 2016

@sum2012
Copy link
Collaborator

sum2012 commented Sep 11, 2016

I see compile error on log........

09-11 12:40:52.235: I/NativeApp(28172): gl_lost() restoring 4 items:
09-11 12:40:52.235: I/NativeApp(28172): gl_lost(1 / 4, 0x7f894bcf90, 7bc0de80)
09-11 12:40:52.235: I/NativeApp(28172): Vertex Shader compile error:
09-11 12:40:52.235: I/NativeApp(28172): Fragment Shader compile error:
09-11 12:40:52.235: I/NativeApp(28172): gl_lost(2 / 4, 0x7f7a3b9750, 7bc0de80)
09-11 12:40:52.235: I/NativeApp(28172): Vertex Shader compile error:
09-11 12:40:52.235: I/NativeApp(28172): Fragment Shader compile error:
09-11 12:40:52.235: I/NativeApp(28172): gl_lost(3 / 4, 0x7f7a3022f8, 7bc0df10)

Lost = delete, restore = create.  Let's stick to never overlapping.

May help hrydgard#8912.
@unknownbrackets
Copy link
Collaborator Author

Sorry - try again. I clearly didn't test enough, because I had a really stupid typo that was causing that.

-[Unknown]

@sum2012
Copy link
Collaborator

sum2012 commented Sep 11, 2016

Well done,fix #8912

@sum2012
Copy link
Collaborator

sum2012 commented Sep 11, 2016

Can you also remove warning ?
Remove import android.os.PowerManager;
1

@@ -1068,7 +1068,7 @@ void PSPSaveDialog::ExecuteNotVisibleIOAction() {
{
bool result = param.GetSize(param.GetPspParam());
// TODO: According to JPCSP, should test/verify this part but seems edge casey.
if (MemoryStick_State() != PSP_MEMORYSTICK_STATE_DRIVER_READY) {
if (MemoryStick_State() != PSP_MEMORYSTICK_STATE_INSERTED) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change seems unrelated?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, just saw the warning when compiling so snuck it in.

-[Unknown]

@hrydgard
Copy link
Owner

I think we've tried this kind of thing before with inconclusive results, but since this helps, I'm totally fine with this as it makes sense.

@hrydgard hrydgard merged commit 8e4bcd7 into hrydgard:master Sep 11, 2016
@sum2012
Copy link
Collaborator

sum2012 commented Sep 11, 2016

I think that this fix should mention in readme

@unknownbrackets unknownbrackets deleted the gl-lost branch September 11, 2016 12:16
@unknownbrackets
Copy link
Collaborator Author

@sum2012 okay, sure.

-[Unknown]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants