nunuhara / xsystem4

Cross-platform implementation of AliceSoft's System 4 engine
GNU General Public License v2.0
45 stars 4 forks source link

Fix "incomplete framebuffer" error in gfx_init_texture_rgb(a) #207

Closed kichikuou closed 2 days ago

kichikuou commented 2 days ago

This fixes "incomplete framebuffer" error in Haru Urare right after the game start, due to gfx_set_framebuffer() being called with a zero width texture. It was a regression introduced by commit 04d5237, which started using gfx_set_framebuffer() in gfx_init_texture_rgba().

Ideally, we should avoid creating zero-area textures in upper layers (commit 3f18b18 was an attempt to do so), but this is difficult because there are many places that create textures. Let's just make sure that we don't generate unrecoverable errors.

nunuhara commented 2 days ago

Thanks!