diff options
| author | 2010-10-16 03:25:42 +0000 | |
|---|---|---|
| committer | 2010-10-16 03:25:42 +0000 | |
| commit | b1d5550ff0332b444f6c7669cca4723e6a99372d (patch) | |
| tree | 618f2d932eeb906010e45da14d66e16d5a91217d /src | |
| parent | 29149cf7349fcd7a86f71bb70cbed6e26b6da650 (diff) | |
Correctly free textures when screen size dynamically changes.
Fixes texture assert when exiting on a number of games.
Diffstat (limited to 'src')
| -rw-r--r-- | src/emu/video.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/emu/video.c b/src/emu/video.c index c8e42c18f30..2ee3790864b 100644 --- a/src/emu/video.c +++ b/src/emu/video.c @@ -2097,12 +2097,10 @@ void screen_device::realloc_screen_bitmaps() if (m_width > curwidth || m_height > curheight) { // free what we have currently - global_free(m_texture[0]); - global_free(m_texture[1]); - if (m_bitmap[0] != NULL) - auto_free(machine, m_bitmap[0]); - if (m_bitmap[1] != NULL) - auto_free(machine, m_bitmap[1]); + m_machine.render().texture_free(m_texture[0]); + m_machine.render().texture_free(m_texture[1]); + auto_free(machine, m_bitmap[0]); + auto_free(machine, m_bitmap[1]); // compute new width/height curwidth = MAX(m_width, curwidth); |
