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

Images 32x32 and under cause hang at creation/loading #41

Open
ghost opened this issue Jul 30, 2016 · 4 comments
Open

Images 32x32 and under cause hang at creation/loading #41

ghost opened this issue Jul 30, 2016 · 4 comments

Comments

@ghost
Copy link

ghost commented Jul 30, 2016

Ever since sf2d_texture_tile32_hardware was added, any image I use that is 32x32 or under causes any program I use sf2d for to crash or hang. Changing TEX_MIN_SIZE to 64 seems to fix this, but I just want to be 100% sure that won't break any other programs that use sf2d first.

@xerpi
Copy link
Owner

xerpi commented Jul 30, 2016

Do you create the textures and tile them manually or do you use https://github.com/xerpi/sfillib ?

@ghost
Copy link
Author

ghost commented Jul 30, 2016

I export them from gimp to c source files and load them like you do in your sample. I only use 3, so I never bothered with romfs and sfilib. After messing with the load order, I found that the two that are 16x16 and 2x16 would cause sf2d_create_texture_mem_RGBA8 to hang. My text box texture I use is 48x56 and it works fine.

The only reason it's an issue now is because of ctrulib dropping the depreciated GPU functions. Before, I'd just point users to the last version that worked. Unfortunately, that one doesn't build anymore.

@ghost
Copy link
Author

ghost commented Aug 8, 2016

I switched to sfillib, and it does work with smaller textures without any modifications to sf2d. It seems like it's only if you create them from memory and they're smaller than 32x32.

@esoteric-programmer
Copy link

esoteric-programmer commented Mar 4, 2017

I had the same problem. I have fixed it locally by changing TEX_MIN_SIZE to 64. However, other people that have not patched TEX_MIN_SIZE manually won't be able to build my code. Is there any reason that TEX_MIN_SIZE has not been changed yet?

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

No branches or pull requests

2 participants