Fix Snapdragon launch with 1.17+ forge loader crash on Zink renderer

This commit is contained in:
ShirosakiMio 2024-08-20 10:52:23 +08:00
parent aefcb2c5e4
commit 232a9e035c
1 changed files with 6 additions and 1 deletions

View File

@ -92,6 +92,7 @@ void osm_make_current(osm_render_window_t* bundle) {
currentBundle = NULL;
return;
}
bool hasSetNoRendererBuffer = false;
bool hasSetMainWindow = false;
currentBundle = bundle;
if(pojav_environ->mainWindowBundle == NULL) {
@ -105,7 +106,11 @@ void osm_make_current(osm_render_window_t* bundle) {
osm_swap_surfaces(bundle);
if(hasSetMainWindow) pojav_environ->mainWindowBundle->state = STATE_RENDERER_ALIVE;
}
osm_set_no_render_buffer(&bundle->buffer);
if (!hasSetNoRendererBuffer)
{
osm_set_no_render_buffer(&bundle->buffer);
hasSetNoRendererBuffer = true;
}
osm_apply_current_ll();
OSMesaPixelStore_p(OSMESA_Y_UP,0);
}