mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Clean up all program close paths to use VVV_exit()
Wow, there are a lot of these. All of these exit paths now use VVV_exit() instead, which attempts to save unlock.vvv and settings.vvv, and also frees all resources so Valgrind is happy. This is a good thing, because previously unlock.vvv/settings.vvv wouldn't be written to if we decided to bail for a given reason.
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
#include "Graphics.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <utf8/unchecked.h>
|
||||
|
||||
#include "editor.h"
|
||||
#include "Entity.h"
|
||||
#include "Exit.h"
|
||||
#include "FileSystemUtils.h"
|
||||
#include "Map.h"
|
||||
#include "Music.h"
|
||||
@@ -254,7 +254,7 @@ int Graphics::font_idx(uint32_t ch)
|
||||
if (iter == font_positions.end())
|
||||
{
|
||||
puts("font.txt missing fallback character!");
|
||||
exit(1);
|
||||
VVV_exit(1);
|
||||
}
|
||||
}
|
||||
return iter->second;
|
||||
@@ -322,7 +322,7 @@ void Graphics::updatetitlecolours()
|
||||
NULL \
|
||||
); \
|
||||
\
|
||||
exit(1); \
|
||||
VVV_exit(1); \
|
||||
}
|
||||
|
||||
#define PROCESS_TILESHEET_RENAME(tilesheet, vector, tile_square, extra_code) \
|
||||
|
||||
Reference in New Issue
Block a user