This commit is contained in:
ZakatTeamI2P 2026-05-04 12:46:41 +04:00
parent e29a3c366c
commit 03a41da4df
4 changed files with 19 additions and 8 deletions

View file

@ -285,7 +285,7 @@ source_group("Binding Source" FILES ${BINDING_SOURCE} ${BINDING_HEADERS})
## Setup main executable ##
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
add_executable(${PROJECT_NAME} MACOSX_BUNDLE WIN32
${MAIN_HEADERS}

View file

@ -27,7 +27,15 @@ left_close = False
if sys.platform == 'darwin': left_close = True
try: base_path = sys._MEIPASS
except AttributeError: base_path = os.path.abspath('.')
except AttributeError:
if os.path.exists(os.getenv('HOME') + "/.cache/sunshine-path.cache"):
with open(os.getenv('HOME') + "/.cache/sunshine-path.cache", "r", encoding="utf-8") as f:
for i, line in enumerate(f):
if i == 1:
base_path = line.strip()
break
else:
base_path = os.path.abspath('.')
class PipeThread(QThread):
def __init__(self, *args, **kwargs):

View file

@ -352,7 +352,7 @@ class Game_Party
return nil
end
# Spin the roulette, choose an actor
return roulette[rand(roulette.size)]
return roulette[Random.rand(roulette.size)]
end
#--------------------------------------------------------------------------
# * Random Selection of Target Actor (HP 0)

View file

@ -36,6 +36,10 @@
#include <string.h>
#include <assert.h>
#include <string>
#include <iostream>
#include <fstream>
#include <cstdlib>
#include <filesystem>
#include "sharedstate.h"
#include "eventthread.h"
@ -178,10 +182,9 @@ static void setupWindowIcon(const Config &conf, SDL_Window *win){
// mainly doing this so journal app knows where to load images from
static void setGamePathInRegistry() {
#if defined WIN32
// this logic is currently windows specific
const char* dataDir = SDL_GetBasePath();
char* dataDir = SDL_GetBasePath();
if (dataDir){
HKEY key;
long keyOpenError = RegOpenKey(HKEY_CURRENT_USER, TEXT("Software\\OneShot\\"), &key);
@ -192,7 +195,8 @@ static void setGamePathInRegistry() {
if (keyCreateError != ERROR_SUCCESS){
showInitError("Unable to create key in registry.");
}else {
}
else {
keyOpenError = ERROR_SUCCESS;
}
}
@ -207,12 +211,11 @@ static void setGamePathInRegistry() {
}
RegCloseKey(key);
}
SDL_free((void*)dataDir);
SDL_free(dataDir);
}
#endif
//TODO handle this for Linux/Mac
}
int main(int argc, char *argv[]){
SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, "0");
SDL_SetHint(SDL_HINT_APP_ID, "OneshotSunshine");