some changes

This commit is contained in:
DepressedTWM 2026-08-04 23:18:32 +04:00
parent f1d4c73061
commit d1d8cf3bb6
6 changed files with 19 additions and 6 deletions

View file

@ -1,9 +1,9 @@
[Desktop Entry] [Desktop Entry]
Type=Application Type=Application
Name=OneShot Name=OneShot: Sunshine
Exec=oneshot %F Exec=oneshot %F
Comment=A surreal puzzle adventure game with unique mechanics / capabilities. Comment=Fan-made remake of Oneshot(2016)
Comment[ru]=Сюрреалистическая головоломка-приключение с уникальными механиками / возможностями. Comment[ru]=Фанатский ремейк Oneshot(2016)
Icon=oneshot Icon=oneshot
Categories=Game; Categories=Game;
Terminal=false Terminal=false

View file

@ -28,4 +28,9 @@ fix crash on game exit
Error handling updated Error handling updated
added gamepad button icons in settings added gamepad button icons in settings
Removed MSVC support Removed MSVC support
Fixed issue #47 Fixed bug #47
Game now support FreeBSD
Fixed bug #46
Added way to disable SecurityManager via oneshot.conf
Vsync code updated

View file

@ -139,3 +139,7 @@ Modloader.use_default_save_path=false
# Pancake episode specific tweaks # Pancake episode specific tweaks
pancakes=false pancakes=false
# SecurityManager - component that uses OS security mechanisms to sandbox,
# recommended use when you play with mods.
SecurityEngine=true

View file

@ -93,7 +93,8 @@ void Config::read(int argc, char *argv[]){
PO_DESC(pathCache, bool, true) \ PO_DESC(pathCache, bool, true) \
PO_DESC(Windows_AllocConsole, bool, false) \ PO_DESC(Windows_AllocConsole, bool, false) \
PO_DESC(Modloader.use_default_save_path, bool, false) \ PO_DESC(Modloader.use_default_save_path, bool, false) \
PO_DESC(pancakes, bool, false) PO_DESC(pancakes, bool, false) \
PO_DESC(SecurityEngine, bool, true)
// Not gonna take your shit boost // Not gonna take your shit boost
#define GUARD_ALL( SDL_exp ) try { SDL_exp } catch(...) {} #define GUARD_ALL( SDL_exp ) try { SDL_exp } catch(...) {}

View file

@ -55,6 +55,7 @@ struct Config{
//std::string AspectPresetRubyConst; //std::string AspectPresetRubyConst;
bool allowSymlinks; bool allowSymlinks;
bool pathCache; bool pathCache;
bool SecurityEngine;
std::string iconPath; std::string iconPath;

View file

@ -217,7 +217,6 @@ int main(int argc, char *argv[]){
#if dos #if dos
__djgpp_nearptr_enable(); __djgpp_nearptr_enable();
#endif #endif
SecurityManagerInit();
startTime = boost::chrono::high_resolution_clock::now(); startTime = boost::chrono::high_resolution_clock::now();
loadLanguageMetadata(); //there will be a segfault on fclose if I don't move it here loadLanguageMetadata(); //there will be a segfault on fclose if I don't move it here
SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, "0"); SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, "0");
@ -274,6 +273,9 @@ int main(int argc, char *argv[]){
/* now we load the config */ /* now we load the config */
Config conf; Config conf;
conf.read(argc, argv); conf.read(argc, argv);
if(conf.SecurityEngine){
SecurityManagerInit();
}
#if windows #if windows
if(conf.Windows_AllocConsole == true){ if(conf.Windows_AllocConsole == true){
AllocConsole(); AllocConsole();