Use SDL_RemovePath instead of DeleteFile

This commit is contained in:
Anonymous Maarten 2024-12-28 01:09:22 +01:00
parent b64d8a5f46
commit b7f4928b98

View File

@ -61,6 +61,7 @@
#include "sndanim_actions.h" #include "sndanim_actions.h"
#include "towtrack.h" #include "towtrack.h"
#include <SDL3/SDL_filesystem.h>
#include <SDL3/SDL_stdinc.h> #include <SDL3/SDL_stdinc.h>
#include <assert.h> #include <assert.h>
#include <stdio.h> #include <stdio.h>
@ -557,7 +558,7 @@ MxResult LegoGameState::AddPlayer(Username& p_player)
if (m_playerCount == 9) { if (m_playerCount == 9) {
GetFileSavePath(&from, 8); GetFileSavePath(&from, 8);
DeleteFile(from.GetData()); SDL_RemovePath(from.GetData());
m_playerCount--; m_playerCount--;
} }