Compare commits

..

4 commits

Author SHA1 Message Date
opa
37ec854ff1 Delete non-need header 2024-08-22 15:03:56 +09:00
opa
d0fdbe58df Doc & more simpler loop 2024-08-22 13:58:49 +09:00
opa
a0a0eba348 Fix and save resource 2024-08-22 11:48:33 +09:00
opa
4542a0199e Fix Utils::FileSystem::getDirContent 2024-08-04 21:15:02 +09:00
6 changed files with 7 additions and 14 deletions

View file

@ -98,7 +98,6 @@ jobs:
-DSDL2_LIBRARY=%SDL2_LIBRARY% -DSDL2_LIBRARY=%SDL2_LIBRARY%
-DVLC_LIBRARIES=%VLC_LIBRARIES% -DVLC_LIBRARIES=%VLC_LIBRARIES%
-DVLC_VERSION=%VLC_VERSION% -DVLC_VERSION=%VLC_VERSION%
-DCMAKE_EXE_LINKER_FLAGS=/SAFESEH:NO
# Use CMake to build project # Use CMake to build project
- name: Build EmulationStation - name: Build EmulationStation

View file

@ -158,8 +158,7 @@ C:\src\EmulationStation>cmake . -B build -A Win32 ^
-DCURL_LIBRARY=%CURL_LIBRARY% ^ -DCURL_LIBRARY=%CURL_LIBRARY% ^
-DSDL2_LIBRARY=%SDL2_LIBRARY% ^ -DSDL2_LIBRARY=%SDL2_LIBRARY% ^
-DVLC_LIBRARIES=%VLC_LIBRARIES% ^ -DVLC_LIBRARIES=%VLC_LIBRARIES% ^
-DVLC_VERSION=%VLC_VERSION% ^ -DVLC_VERSION=%VLC_VERSION%
-DCMAKE_EXE_LINKER_FLAGS=/SAFESEH:NO
``` ```
* Use CMake to build the Visual Studio project. * Use CMake to build the Visual Studio project.

View file

@ -280,10 +280,10 @@ void FileData::launchGame(Window* window)
{ {
LOG(LogInfo) << "Attempting to launch game..."; LOG(LogInfo) << "Attempting to launch game...";
#ifndef _WIN32
AudioManager::getInstance()->deinit(); AudioManager::getInstance()->deinit();
VolumeControl::getInstance()->deinit(); VolumeControl::getInstance()->deinit();
InputManager::getInstance()->deinit(); InputManager::getInstance()->deinit();
#ifndef _WIN32
window->deinit(); window->deinit();
#endif #endif
@ -312,9 +312,9 @@ void FileData::launchGame(Window* window)
#ifndef _WIN32 #ifndef _WIN32
window->init(); window->init();
#endif
InputManager::getInstance()->init(); InputManager::getInstance()->init();
VolumeControl::getInstance()->init(); VolumeControl::getInstance()->init();
#endif
window->normalizeNextUpdate(); window->normalizeNextUpdate();
//update number of times the game has been launched //update number of times the game has been launched

View file

@ -7,7 +7,6 @@
#include "Settings.h" #include "Settings.h"
#ifdef WIN32 #ifdef WIN32
#include <basetsd.h> #include <basetsd.h>
#include <codecvt>
typedef SSIZE_T ssize_t; typedef SSIZE_T ssize_t;
#else #else
#include <unistd.h> #include <unistd.h>

View file

@ -2,9 +2,7 @@
#include <SDL_events.h> #include <SDL_events.h>
#ifdef WIN32 #ifdef WIN32
#include <codecvt>
#include <SDL.h> #include <SDL.h>
#include <SDL_opengl.h>
#include <Windows.h> #include <Windows.h>
#include "renderers/Renderer.h" #include "renderers/Renderer.h"
#else #else
@ -55,7 +53,6 @@ int launchGameCommand(const std::string& cmd_utf8)
SDL_SetWindowFullscreen(Renderer::getSDLWindow(), 0); SDL_SetWindowFullscreen(Renderer::getSDLWindow(), 0);
SDL_SetWindowBordered(Renderer::getSDLWindow(), SDL_TRUE); SDL_SetWindowBordered(Renderer::getSDLWindow(), SDL_TRUE);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
Renderer::swapBuffers(); Renderer::swapBuffers();
memset(&si, 0, sizeof si); memset(&si, 0, sizeof si);
@ -65,12 +62,9 @@ int launchGameCommand(const std::string& cmd_utf8)
if(!CreateProcess(NULL, (LPSTR)cmd_utf8.c_str(), NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) if(!CreateProcess(NULL, (LPSTR)cmd_utf8.c_str(), NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
return 9009; return 9009;
while(true){ while(WaitForSingleObject(pi.hProcess, 200) == WAIT_TIMEOUT)
if(WaitForSingleObject(pi.hProcess, 200) == 0)
break;
while(SDL_PollEvent(&event)) while(SDL_PollEvent(&event))
; // NOP ; // NOP
}
GetExitCodeProcess(pi.hProcess, &rcode); GetExitCodeProcess(pi.hProcess, &rcode);
CloseHandle(pi.hProcess); CloseHandle(pi.hProcess);

View file

@ -69,8 +69,10 @@ namespace Utils
if(_recursive && isDirectory(fullName)) if(_recursive && isDirectory(fullName))
contentList.merge(getDirContent(fullName, true)); contentList.merge(getDirContent(fullName, true));
} }
FindNextFile(hFind, &findData);
} }
while(FindNextFile(hFind, &findData)); while(GetLastError() != ERROR_NO_MORE_FILES);
FindClose(hFind); FindClose(hFind);
} }