This commit is contained in:
whitecum1488 2026-07-02 22:54:50 +03:00
parent 82c70b1a73
commit 8b8785949e
2 changed files with 9 additions and 7 deletions

View File

@ -34,7 +34,7 @@
#include "debugwriter.h" #include "debugwriter.h"
#include "util.h" #include "util.h"
#include "sdl-util.h" #include "sdl-util.h"
#include <SDL3/SDL_system.h>
namespace std{ namespace std{
std::ostream& operator<<(std::ostream &os, const std::vector<std::string> &vec){ std::ostream& operator<<(std::ostream &os, const std::vector<std::string> &vec){
for (auto item : vec){ for (auto item : vec){
@ -166,7 +166,9 @@ void Config::read(int argc, char *argv[]){
SE.sourceCount = clamp(SE.sourceCount, 1, 64); SE.sourceCount = clamp(SE.sourceCount, 1, 64);
#ifdef __ANDROID__ #ifdef __ANDROID__
commonDataPath = prefPath(SDL_GetAndroidInternalStoragePath(), "/Sunshine"); commonDataPath = prefPath(SDL_GetAndroidInternalStoragePath(), "/SunshineSaves");
gameFolder = "";
gameFolder.append(SDL_GetAndroidInternalStoragePath()).append("/Sunshine");
#else #else
commonDataPath = prefPath(".", "Sunshine"); commonDataPath = prefPath(".", "Sunshine");
#endif #endif

View File

@ -58,7 +58,7 @@
#include "binding.h" #include "binding.h"
#include "icon.png.xxd" #include "icon.png.xxd"
#include <SDL3/SDL_system.h>
#ifdef STEAM #ifdef STEAM
#include "steamshim/steamshim_child.h" #include "steamshim/steamshim_child.h"
#else #else
@ -121,7 +121,6 @@ int rgssThreadFun(void *userdata){
bool vsync = conf.vsync || conf.syncToRefreshrate; bool vsync = conf.vsync || conf.syncToRefreshrate;
SDL_GL_SetSwapInterval(vsync ? 1 : 0); SDL_GL_SetSwapInterval(vsync ? 1 : 0);
#ifndef NDEBUG #ifndef NDEBUG
GLDebugLogger dLogger; GLDebugLogger dLogger;
#endif #endif
@ -230,12 +229,13 @@ int main(int argc, char *argv[]){
#if SDL_VERSION_ATLEAST(3, 4, 10) #if SDL_VERSION_ATLEAST(3, 4, 10)
SDL_SetHint(SDL_HINT_VIDEO_X11_ENABLE_XSYNC_EXT, "1"); SDL_SetHint(SDL_HINT_VIDEO_X11_ENABLE_XSYNC_EXT, "1");
#endif #endif
#elif defined(WIN32) #elif WIN32
SDL_SetHint(SDL_HINT_WINDOWS_RAW_KEYBOARD, "1"); SDL_SetHint(SDL_HINT_WINDOWS_RAW_KEYBOARD, "1");
#else #elif __ANDROID__
SDL_SetHint(SDL_HINT_ANDROID_ALLOW_PERSISTENT_FOLDER_ACCESS, "1");
#elif defined(__DJGPP__) || defined(__DOS__) || defined(__MSDOS__)
SDL_SetHint(SDL_HINT_DOS_ALLOW_DIRECT_FRAMEBUFFER, "1"); SDL_SetHint(SDL_HINT_DOS_ALLOW_DIRECT_FRAMEBUFFER, "1");
#endif #endif
/* initialize SDL first */ /* initialize SDL first */
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | SDL_INIT_GAMEPAD) == false){ if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | SDL_INIT_GAMEPAD) == false){
crash(Exception::MEOW, "Error initializing SDL: %s", SDL_GetError()); crash(Exception::MEOW, "Error initializing SDL: %s", SDL_GetError());