Sets some global preferences for the renderer
| 370 | |
| 371 | // Sets some global preferences for the renderer |
| 372 | int rend_SetPreferredState(renderer_preferred_state *pref_state) { |
| 373 | int retval = 1; |
| 374 | renderer_preferred_state old_state = gpu_preferred_state; |
| 375 | |
| 376 | gpu_preferred_state = *pref_state; |
| 377 | if (gpu_state.initted) { |
| 378 | int reinit = 0; |
| 379 | mprintf(0, "Inside pref state!\n"); |
| 380 | |
| 381 | // Change gamma if needed |
| 382 | if (pref_state->width != gpu_state.screen_width || pref_state->height != gpu_state.screen_height || |
| 383 | old_state.bit_depth != pref_state->bit_depth) { |
| 384 | reinit = 1; |
| 385 | } |
| 386 | |
| 387 | if (reinit) { |
| 388 | retval = rend_ReInit(); |
| 389 | } else { |
| 390 | if (old_state.gamma != pref_state->gamma) { |
| 391 | rend_SetGammaValue(pref_state->gamma); |
| 392 | } |
| 393 | } |
| 394 | } else { |
| 395 | gpu_preferred_state = *pref_state; |
| 396 | } |
| 397 | |
| 398 | return retval; |
| 399 | } |
| 400 | |
| 401 | // Draws a simple bitmap at the specified x,y location |
| 402 | void rend_DrawSimpleBitmap(int bm_handle, int x, int y) { |
no test coverage detected