-
Notifications
You must be signed in to change notification settings - Fork 131
Android fixes #150
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
base: master
Are you sure you want to change the base?
Android fixes #150
Conversation
|
Inspired by @klaymen1n |
src/gl/glad/khrplatform.h
Outdated
| #elif defined (__SYMBIAN32__) | ||
| # define KHRONOS_APICALL IMPORT_C | ||
| #elif defined(__ANDROID__) | ||
| #elif defined(__ANDROID__) || defined(ANDROID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think only using __ANDROID__ is enough.
__ANDROID_ is an intrinsic defined by the compiler. ANDROID is added by the Android build CMake toolchain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't addressed yet.
src/image.cpp
Outdated
| uint64 alphas = 0; | ||
| memcpy(&alphas, src+j+2, sizeof(alphas)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs extra documentation.
Or at least it's not SDL2/3-related.
aap should comment on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
arm bus
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see. Is this alignment-related?
If so, you can unconditionally do the memcpy. The undefined sanitizer will also complain about this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can replace this with a for loop and let the compiler do the rest ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah, the compiler should do that with -O2.
| natras->backingStore->levels[level].size); | ||
| } | ||
| }else{ | ||
| } else if(level == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a look by aap.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes a bug that causes some textures to appear black. Maybe related to #128
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Only a few minor adjustments are needed. |
|
I've tried to simulate computer resolution on devices without resolution support, and it's incredibly difficult. I can't get past the first cutscene. |
|
Although there are no bugs: In ARM, some types tend to behave differently; some bitwise types may be broken, and that may be what causes some breakages in the format conversion. |


@madebr