Skip to content

Conversation

@boludoz
Copy link

@boludoz boludoz commented Dec 11, 2025

@boludoz
Copy link
Author

boludoz commented Dec 11, 2025

Inspired by @klaymen1n

@boludoz boludoz changed the title Android fix Android fixes Dec 11, 2025
#elif defined (__SYMBIAN32__)
# define KHRONOS_APICALL IMPORT_C
#elif defined(__ANDROID__)
#elif defined(__ANDROID__) || defined(ANDROID)
Copy link
Contributor

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.

Copy link
Contributor

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
Comment on lines 305 to 306
uint64 alphas = 0;
memcpy(&alphas, src+j+2, sizeof(alphas));
Copy link
Contributor

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.

Copy link
Author

Choose a reason for hiding this comment

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

arm bus

Copy link
Contributor

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.

Copy link
Author

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 ?

Copy link
Contributor

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) {
Copy link
Contributor

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.

Copy link
Author

@boludoz boludoz Dec 11, 2025

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

Copy link
Author

Choose a reason for hiding this comment

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

image image

@boludoz
Copy link
Author

boludoz commented Dec 12, 2025

Only a few minor adjustments are needed.

@boludoz
Copy link
Author

boludoz commented Dec 15, 2025

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.

@boludoz
Copy link
Author

boludoz commented Dec 19, 2025

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.

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.

2 participants