Merge branch 'master' of ssh://code.nikooneshot.ru:222/Sunshine/mkxp-sunshine
This commit is contained in:
commit
ddd0d50ac3
|
|
@ -6,7 +6,6 @@ include(FindPackageHandleStandardArgs)
|
||||||
option(STEAM "Build for Steam" OFF)
|
option(STEAM "Build for Steam" OFF)
|
||||||
option(DEBUG "Debug mode" ON)
|
option(DEBUG "Debug mode" ON)
|
||||||
option(NATIVE "Use native instructions(for local use only)" OFF)
|
option(NATIVE "Use native instructions(for local use only)" OFF)
|
||||||
option(MODLOADER "Build with modloader" ON)
|
|
||||||
|
|
||||||
#Configuration
|
#Configuration
|
||||||
set(CMAKE_DISABLE_IN_SOURCE_BUILD TRUE)
|
set(CMAKE_DISABLE_IN_SOURCE_BUILD TRUE)
|
||||||
|
|
@ -158,10 +157,8 @@ elseif(BSD)
|
||||||
list(APPEND MAIN_SOURCE src/xdg-user-dir-lookup.c)
|
list(APPEND MAIN_SOURCE src/xdg-user-dir-lookup.c)
|
||||||
list(APPEND MAIN_HEADERS src/xdg-user-dir-lookup.h)
|
list(APPEND MAIN_HEADERS src/xdg-user-dir-lookup.h)
|
||||||
set(STEAM OFF)
|
set(STEAM OFF)
|
||||||
set(MODLOADER OFF)
|
|
||||||
elseif(EMSCRIPTEN)
|
elseif(EMSCRIPTEN)
|
||||||
set(STEAM OFF)
|
set(STEAM OFF)
|
||||||
set(MODLOADER OFF)
|
|
||||||
set(CMAKE_EXECUTABLE_SUFFIX ".html" CACHE INTERNAL "")
|
set(CMAKE_EXECUTABLE_SUFFIX ".html" CACHE INTERNAL "")
|
||||||
elseif(APPLE)
|
elseif(APPLE)
|
||||||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND cmake -P "${CMAKE_SOURCE_DIR}/patches/mac/CompleteBundle.cmake" VERBATIM)
|
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND cmake -P "${CMAKE_SOURCE_DIR}/patches/mac/CompleteBundle.cmake" VERBATIM)
|
||||||
|
|
@ -367,11 +364,9 @@ find_package(Ruby 3.0 REQUIRED COMPONENTS Development)
|
||||||
pkg_check_modules(VORBISFILE REQUIRED vorbisfile)
|
pkg_check_modules(VORBISFILE REQUIRED vorbisfile)
|
||||||
find_package_handle_standard_args(pixman-1 DEFAULT_MSG PIXMAN_LIBRARY PIXMAN_INCLUDE_DIR)
|
find_package_handle_standard_args(pixman-1 DEFAULT_MSG PIXMAN_LIBRARY PIXMAN_INCLUDE_DIR)
|
||||||
mark_as_advanced(PIXMAN_INCLUDE_DIR PIXMAN_LIBRARY)
|
mark_as_advanced(PIXMAN_INCLUDE_DIR PIXMAN_LIBRARY)
|
||||||
if(MODLOADER)
|
find_package(OpenSSL CONFIG REQUIRED COMPONENTS Crypto)
|
||||||
find_package(OpenSSL CONFIG REQUIRED COMPONENTS Crypto)
|
pkg_check_modules(SIGC2 REQUIRED sigc++-2.0)
|
||||||
pkg_check_modules(SIGC2 REQUIRED sigc++-2.0)
|
pkg_check_modules(LIBZIP REQUIRED libzip)
|
||||||
pkg_check_modules(LIBZIP REQUIRED libzip)
|
|
||||||
endif()
|
|
||||||
target_compile_definitions(${PROJECT_NAME} PRIVATE ${DEFINES})
|
target_compile_definitions(${PROJECT_NAME} PRIVATE ${DEFINES})
|
||||||
|
|
||||||
target_include_directories(${PROJECT_NAME} PRIVATE src include ${PIXMAN_INCLUDE_DIR} ${SIGC2_INCLUDE_DIRS}
|
target_include_directories(${PROJECT_NAME} PRIVATE src include ${PIXMAN_INCLUDE_DIR} ${SIGC2_INCLUDE_DIRS}
|
||||||
|
|
@ -384,12 +379,8 @@ physfs ${PIXMAN_LIBRARY} ${SIGC2_LIBRARIES} ${PLATFORM_LIBRARIES}
|
||||||
${Ruby_LIBRARIES} Boost::boost Boost::chrono ${Boost_LIBRARIES}
|
${Ruby_LIBRARIES} Boost::boost Boost::chrono ${Boost_LIBRARIES}
|
||||||
${VORBISFILE_LIBRARIES} ZLIB::ZLIB ${PLATFORM_LIBS})
|
${VORBISFILE_LIBRARIES} ZLIB::ZLIB ${PLATFORM_LIBS})
|
||||||
|
|
||||||
if(MODLOADER)
|
target_include_directories(${PROJECT_NAME} PRIVATE ${LIBZIP_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR})
|
||||||
target_include_directories(${PROJECT_NAME} PRIVATE ${LIBZIP_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR})
|
target_link_libraries(${PROJECT_NAME} PRIVATE ${LIBZIP_LIBRARIES} OpenSSL::Crypto)
|
||||||
target_link_libraries(${PROJECT_NAME} PRIVATE ${LIBZIP_LIBRARIES} OpenSSL::Crypto)
|
|
||||||
else()
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(STEAM)
|
if(STEAM)
|
||||||
add_subdirectory(steamshim_parent)
|
add_subdirectory(steamshim_parent)
|
||||||
|
|
|
||||||
|
|
@ -3,17 +3,17 @@
|
||||||
| Платформа<br>Platform | Завершено<br>Done % | Состояние<br>State |
|
| Платформа<br>Platform | Завершено<br>Done % | Состояние<br>State |
|
||||||
| :--- | :---: | :--- |
|
| :--- | :---: | :--- |
|
||||||
| Windows | 100% | Играбельно |
|
| Windows | 100% | Играбельно |
|
||||||
| Linux | 91% | В работе, но уже играбельно<br>TODO:<br> \* Fix Wallpaper manager |
|
| Linux | 91% | В работе, но уже играбельно<br>TODO:<br> \* Fix Wallpaper manager
|
||||||
| *BSD | 15% | не в работе |
|
| *BSD | 15% | не в работе |
|
||||||
| GNU/Hurd | 1% | не в работе |
|
| GNU/Hurd | 1% | не в работе |
|
||||||
| Solaris/OpenSolaris | 1% | не в работе |
|
| Solaris/OpenSolaris | 1% | не в работе |
|
||||||
| RedoxOS | 0% | Не хватает библеотек |
|
| RedoxOS | 0% | Не хватает библеотек |
|
||||||
| Android | 4% | В работе |
|
| Android | 4% | В работе |
|
||||||
| PS Vita | 0% | не в работе |
|
| PS Vita | 1% | не в работе |
|
||||||
| PSP | 1% | не в работе |
|
| PSP | 1% | не в работе |
|
||||||
| Emspritein(web) | 11% | Нет хватает библеотек<br> \* Нужно написать порт библеотеки libsigc++2<br>(А лучше 3 и переписать движок)<br> \* Проблемы с компиляцией и зависимостями |
|
| Emspritein(web) | 11% | Нет хватает библеотек<br> \* Нужно написать порт библеотеки libsigc++2<br>(А лучше 3 и переписать движок)<br> \* Проблемы с компиляцией и зависимостями |
|
||||||
| HaikuOS | 0% | не в работе |
|
| HaikuOS | 1% | не в работе |
|
||||||
| DOS | 0.2% | Не в работе |
|
| DOS | 1% | Не в работе |
|
||||||
| Ubuntu Touch | 60% | Будет почти готово тогда когда Linux порт будет доведён до ума |
|
| Ubuntu Touch | 60% | Будет почти готово тогда когда Linux порт будет доведён до ума |
|
||||||
| Аврора ОС | 0% | не в работе |
|
| Аврора ОС | 0% | не в работе |
|
||||||
| ChromeOS/ChromiumOS | 0.4% | Неизвестное |
|
| ChromeOS/ChromiumOS | 0.4% | Неизвестное |
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,12 @@
|
||||||
Added 16:9 panorams support
|
|
||||||
Added Panorams/green/maize_16.png
|
|
||||||
mri-bindings cleanup
|
mri-bindings cleanup
|
||||||
RAM usage optimizations
|
RAM usage optimizations
|
||||||
*BSD and emscriptein specific fixes
|
*BSD and emscriptein specific fixes
|
||||||
On windows use of RAW input events by default
|
On windows use of RAW input events by default
|
||||||
Maps changes
|
|
||||||
Added JIT support
|
Added JIT support
|
||||||
Reload on F5(in debug)
|
Reload on F5(in debug)
|
||||||
Scene_Map optimization
|
Scene_Map optimization
|
||||||
TPtL aray limit set to 300
|
TPtL aray limit set to 300
|
||||||
New 16:9 arts
|
Arts in bigger resolution
|
||||||
Optimized and extended debugwriter.h
|
Optimized and extended debugwriter.h
|
||||||
Water shader optimized
|
Water shader optimized
|
||||||
Mouse scrolling support
|
Mouse scrolling support
|
||||||
|
|
@ -17,17 +14,15 @@ Small ruby optimizations
|
||||||
Boost+Ruby sprintf error fix
|
Boost+Ruby sprintf error fix
|
||||||
New settings menu
|
New settings menu
|
||||||
Extended debug mode configuration
|
Extended debug mode configuration
|
||||||
Added TracePoimt based profiler
|
Added TracePoint based profiler
|
||||||
Added April fools enforce mode
|
Added April fools enforce mode
|
||||||
Added way to control WM shader via settings
|
Added way to control WM shader via settings
|
||||||
Optimized game loading
|
Optimized game loading
|
||||||
Fasttravel settings
|
Fasttravel settings
|
||||||
Removed useless hooks
|
Removed useless hooks
|
||||||
Added way to set Led color on gamepads
|
|
||||||
Switches code optimized
|
Switches code optimized
|
||||||
Added eval protection for events interpritator and for Characters scripts
|
Added eval protection for events interpritator and for Characters scripts
|
||||||
Added in-game keybindings settings
|
Added in-game keybindings settings
|
||||||
Added switch 400(defines 4:3 or 16:9 is used)
|
|
||||||
Removed depth limit for common events
|
Removed depth limit for common events
|
||||||
Fixed bug "Андрей"
|
Fixed bug "Андрей"
|
||||||
Fixed film
|
Fixed film
|
||||||
|
|
@ -42,7 +37,7 @@ Fixed audio bug
|
||||||
Добавлены отражения от плитки в стартовом доме
|
Добавлены отражения от плитки в стартовом доме
|
||||||
Игра переведена на другое разрешение экрана и поддержку большего кол-во аспектов мониторов
|
Игра переведена на другое разрешение экрана и поддержку большего кол-во аспектов мониторов
|
||||||
Fixed performance issues
|
Fixed performance issues
|
||||||
Android support patches
|
Android support patches(WIP)
|
||||||
Some Pancake episode specific changes
|
Some Pancake episode specific changes
|
||||||
squares when dialog skipping fixed
|
squares when dialog skipping fixed
|
||||||
Mirrors!
|
Mirrors!
|
||||||
|
|
@ -53,7 +48,7 @@ crash() function update
|
||||||
Start house reworked
|
Start house reworked
|
||||||
removed SDL joystick support
|
removed SDL joystick support
|
||||||
fixed SECCOMP blocking UDEV sockets
|
fixed SECCOMP blocking UDEV sockets
|
||||||
Some Barens changes
|
Barrens rework(WIP)
|
||||||
dev room!
|
dev room!
|
||||||
MacOS support in SecurityManager
|
MacOS support in SecurityManager
|
||||||
Changed default 16:9 window resolution
|
Changed default 16:9 window resolution
|
||||||
|
|
@ -67,12 +62,20 @@ main viewport resize, main window resize and move signals bindings for ruby
|
||||||
Dynamic resolution support (WIP)
|
Dynamic resolution support (WIP)
|
||||||
Rewrited to use SDL3 libc methods instead default
|
Rewrited to use SDL3 libc methods instead default
|
||||||
Removed useless debug logs
|
Removed useless debug logs
|
||||||
Glen reworked
|
Glen reworked(WIP)
|
||||||
GLLogger \n bug fix
|
GLLogger \n bug fix
|
||||||
|
LXDE support added
|
||||||
|
DOS porting patches(WIP) (lol)
|
||||||
|
PS2 porting patches(WIP) (lol)
|
||||||
|
PSVita porting patches(WIP)
|
||||||
|
other platforms porting patches
|
||||||
|
Added new location
|
||||||
|
Extended Office location
|
||||||
|
Reworked Refuge(WIP)
|
||||||
|
Updated Game quit common event
|
||||||
|
Solstice credits updated
|
||||||
Removed text size limit in Ed Message
|
Removed text size limit in Ed Message
|
||||||
Rewrited Linux build scripts
|
Rewrited Linux build scripts
|
||||||
Barrens reworked
|
|
||||||
Solstice credits fixed
|
|
||||||
Deleted unused maps
|
Deleted unused maps
|
||||||
cafe map size fixed
|
Game maps size fixed
|
||||||
Big performance fix
|
Big performance fix
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,6 @@ module Settings
|
||||||
:en_purple_messagebox => true,
|
:en_purple_messagebox => true,
|
||||||
:enforce_april_fools => false,
|
:enforce_april_fools => false,
|
||||||
:true_memory_mode => false,
|
:true_memory_mode => false,
|
||||||
:pre_solstice_update_content => false,
|
|
||||||
:dejavu_mode => false,
|
|
||||||
:demo => false,
|
|
||||||
:oneshot_mode => false,
|
:oneshot_mode => false,
|
||||||
|
|
||||||
# Advanced
|
# Advanced
|
||||||
|
|
@ -171,11 +168,6 @@ class Window_Settings
|
||||||
:name => tr('Dynamic Light'),
|
:name => tr('Dynamic Light'),
|
||||||
:parameter => :light,
|
:parameter => :light,
|
||||||
},
|
},
|
||||||
#{
|
|
||||||
# :type => :bool,
|
|
||||||
# :name => tr('Shadows'),
|
|
||||||
# :parameter => :light_shadows
|
|
||||||
#},
|
|
||||||
],
|
],
|
||||||
tr("UI") => [
|
tr("UI") => [
|
||||||
{
|
{
|
||||||
|
|
@ -225,12 +217,7 @@ class Window_Settings
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:type => :bool,
|
:type => :bool,
|
||||||
:name => tr('Dejavu mode(Not implemented)'),
|
:name => tr('Freeware Mode(!, WIP)'),
|
||||||
:parameter => :dejavu_mode
|
|
||||||
},
|
|
||||||
{
|
|
||||||
:type => :bool,
|
|
||||||
:name => tr('Freeware Mode(!)'),
|
|
||||||
:parameter => :oneshot_mode
|
:parameter => :oneshot_mode
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
@ -240,13 +227,6 @@ class Window_Settings
|
||||||
:name => tr('Control LED lighting on gamepads'),
|
:name => tr('Control LED lighting on gamepads'),
|
||||||
:parameter => :gamepad_led
|
:parameter => :gamepad_led
|
||||||
},
|
},
|
||||||
#{
|
|
||||||
# :type => :slider,
|
|
||||||
# :name => tr("Gamepad deadzone"),
|
|
||||||
# :parameter => :gamepad_deadzone,
|
|
||||||
# :min => 0,
|
|
||||||
# :max => 10
|
|
||||||
#},
|
|
||||||
{ :type => :sep, :name => tr("Walk") },
|
{ :type => :sep, :name => tr("Walk") },
|
||||||
{
|
{
|
||||||
:type => :key,
|
:type => :key,
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ class Scene_Map
|
||||||
@blackfade.z = 9999
|
@blackfade.z = 9999
|
||||||
color = GamepadMapColors::COLORS[$game_map.map_id] || GamepadMapColors::SUN
|
color = GamepadMapColors::COLORS[$game_map.map_id] || GamepadMapColors::SUN
|
||||||
Input.set_led(color.red, color.green, color.blue)
|
Input.set_led(color.red, color.green, color.blue)
|
||||||
RPG::Mod.exec_hooks("hooks/Scene_Map/main", binding)
|
|
||||||
|
|
||||||
# Transition run
|
# Transition run
|
||||||
Graphics.transition
|
Graphics.transition
|
||||||
|
|
|
||||||
73
src/define.h
73
src/define.h
|
|
@ -1,5 +1,70 @@
|
||||||
#if defined(__linux__) || defined(__sun) || defined(__APPLE__) || \
|
#include <SDL3/SDL_platform_defines.h>
|
||||||
defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || \
|
|
||||||
defined(__GNU__) || defined(__hurd__) || defined(__DragonFly__)
|
#if defined(SDL_PLATFORM_AIX) || defined(SDL_PLATFORM_BSDI) || defined(SDL_PLATFORM_FREEBSD) || \
|
||||||
#define unix_like 1
|
defined(SDL_PLATFORM_HPUX) || defined(SDL_PLATFORM_HURD) || defined(SDL_PLATFORM_IRIX) || \
|
||||||
|
defined(SDL_PLATFORM_LINUX) || defined(SDL_PLATFORM_MACOS) || defined(SDL_PLATFORM_NETBSD) || \
|
||||||
|
defined(SDL_PLATFORM_OPENBSD) || defined(SDL_PLATFORM_SOLARIS) || defined(SDL_PLATFORM_UNIX) || \
|
||||||
|
defined(SDL_PLATFORM_APPLE) || defined(SDL_PLATFORM_OSF)
|
||||||
|
#define unix_like 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(SDL_PLATFORM_DOS)
|
||||||
|
#define dos 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(SDL_WINAPI_FAMILY_PHONE) || defined(SDL_PLATFORM_WINDOWS) || defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINGDK)
|
||||||
|
#define windows 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(SDL_PLATFORM_XBOXSERIES) || defined(SDL_PLATFORM_XBOXONE)
|
||||||
|
#define xbox 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if SDL_PLATFORM_3DS
|
||||||
|
#define 3ds 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if SDL_PLATFORM_ANDROID
|
||||||
|
#define android 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(SDL_PLATFORM_APPLE) || defined(SDL_PLATFORM_TVOS) || defined(SDL_PLATFORM_VISIONOS)
|
||||||
|
#define apple 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if SDL_PLATFORM_EMSCRIPTEN
|
||||||
|
#define web 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if SDL_PLATFORM_HAIKU
|
||||||
|
#define haiku 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if SDL_PLATFORM_IOS
|
||||||
|
#define ios 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(SDL_PLATFORM_OS2)
|
||||||
|
#define os2 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if SDL_PLATFORM_PS2
|
||||||
|
#define ps2 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if SDL_PLATFORM_PSP
|
||||||
|
#define psp 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if SDL_PLATFORM_QNXNTO
|
||||||
|
#define qnx 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if SDL_PLATFORM_VITA
|
||||||
|
#define vita 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if SDL_PLATFORM_RISCOS
|
||||||
|
#define riscos 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,19 +32,16 @@
|
||||||
#include <SDL3/SDL_thread.h>
|
#include <SDL3/SDL_thread.h>
|
||||||
#include <SDL3/SDL_touch.h>
|
#include <SDL3/SDL_touch.h>
|
||||||
#include <SDL3/SDL_rect.h>
|
#include <SDL3/SDL_rect.h>
|
||||||
|
#include <SDL3/SDL_stdinc.h>
|
||||||
|
|
||||||
#include "sharedstate.h"
|
#include "sharedstate.h"
|
||||||
#include "graphics.h"
|
#include "graphics.h"
|
||||||
#include "al-util.h"
|
#include "al-util.h"
|
||||||
#include "debugwriter.h"
|
#include "debugwriter.h"
|
||||||
|
|
||||||
#include "oneshot.h"
|
#include "oneshot.h"
|
||||||
|
|
||||||
#include <SDL3/SDL_stdinc.h>
|
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
typedef void (ALC_APIENTRY *LPALCDEVICEPAUSESOFT) (ALCdevice *device);
|
typedef void (ALC_APIENTRY *LPALCDEVICEPAUSESOFT) (ALCdevice *device);
|
||||||
|
|
@ -106,9 +103,7 @@ bool EventThread::allocUserEvents(){
|
||||||
}
|
}
|
||||||
|
|
||||||
EventThread::EventThread()
|
EventThread::EventThread()
|
||||||
: fullscreen(false),
|
: fullscreen(false), showCursor(true){}
|
||||||
showCursor(true)
|
|
||||||
{}
|
|
||||||
|
|
||||||
void EventThread::process(RGSSThreadData &rtData){
|
void EventThread::process(RGSSThreadData &rtData){
|
||||||
SDL_Event event;
|
SDL_Event event;
|
||||||
|
|
@ -157,7 +152,7 @@ void EventThread::process(RGSSThreadData &rtData){
|
||||||
jId = ids[i];
|
jId = ids[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Gamepad connected: %s", SDL_GetGamepadName(gc));
|
Debug() << "Gamepad connected: " << SDL_GetGamepadName(gc);
|
||||||
|
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
SDL_CloseGamepad(gamepd);
|
SDL_CloseGamepad(gamepd);
|
||||||
|
|
@ -269,7 +264,10 @@ void EventThread::process(RGSSThreadData &rtData){
|
||||||
|
|
||||||
/* Now process the rest */
|
/* Now process the rest */
|
||||||
switch (event.type){
|
switch (event.type){
|
||||||
case SDL_EVENT_QUIT :
|
case SDL_EVENT_LOW_MEMORY:
|
||||||
|
rb_gc();
|
||||||
|
break;
|
||||||
|
case SDL_EVENT_QUIT:
|
||||||
if (rtData.allowExit) {
|
if (rtData.allowExit) {
|
||||||
terminate = true;
|
terminate = true;
|
||||||
Debug() << "[EventThread::process] EventThread termination requested";
|
Debug() << "[EventThread::process] EventThread termination requested";
|
||||||
|
|
|
||||||
27
src/main.cpp
27
src/main.cpp
|
|
@ -66,6 +66,12 @@
|
||||||
#include "gamecontrollerdb.txt.xxd"
|
#include "gamecontrollerdb.txt.xxd"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ps2
|
||||||
|
#ifdef DEBUG
|
||||||
|
SDL_PS2_SKIP_IOP_RESET();
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
static void rgssThreadError(RGSSThreadData *rtData, const std::string &msg){
|
static void rgssThreadError(RGSSThreadData *rtData, const std::string &msg){
|
||||||
rtData->rgssErrorMsg = msg;
|
rtData->rgssErrorMsg = msg;
|
||||||
rtData->ethread->requestTerminate();
|
rtData->ethread->requestTerminate();
|
||||||
|
|
@ -215,26 +221,31 @@ static void setGamePathInRegistry() {
|
||||||
//TODO handle this for Linux/Mac
|
//TODO handle this for Linux/Mac
|
||||||
}
|
}
|
||||||
int main(int argc, char *argv[]){
|
int main(int argc, char *argv[]){
|
||||||
|
#if dos
|
||||||
|
__djgpp_nearptr_enable();
|
||||||
|
#endif
|
||||||
|
|
||||||
SecurityManagerInit();
|
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");
|
||||||
SDL_SetHint(SDL_HINT_APP_ID, "OneshotSunshine");
|
SDL_SetAppMetadata("Oneshot: Sunshine", "0.1.1", "com.catwindowteam.sunshine");
|
||||||
SDL_SetHint(SDL_HINT_APP_NAME, "Oneshot: Sunshine");
|
|
||||||
SDL_SetHint(SDL_HINT_AUDIO_DEVICE_STREAM_NAME, "Oneshot: sunshine");
|
|
||||||
SDL_SetHint(SDL_HINT_AUDIO_DEVICE_STREAM_ROLE, "Game");
|
|
||||||
//X11 work on *BSD,Solaris too!
|
//X11 work on *BSD,Solaris too!
|
||||||
#if unix_like
|
#if unix_like
|
||||||
SDL_SetHint(SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, "0");
|
SDL_SetHint(SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, "0");
|
||||||
#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 windows
|
||||||
SDL_SetHint(SDL_HINT_WINDOWS_RAW_KEYBOARD, "1");
|
SDL_SetHint(SDL_HINT_WINDOWS_RAW_KEYBOARD, "1");
|
||||||
#elif __ANDROID__
|
#elif android
|
||||||
SDL_SetHint(SDL_HINT_ANDROID_ALLOW_PERSISTENT_FOLDER_ACCESS, "1");
|
SDL_SetHint(SDL_HINT_ANDROID_ALLOW_PERSISTENT_FOLDER_ACCESS, "1");
|
||||||
#elif defined(__DJGPP__) || defined(__DOS__) || defined(__MSDOS__)
|
#elif vita
|
||||||
|
SDL_SetHint(SDL_HINT_VITA_RESOLUTION, "1080");
|
||||||
|
#elif ps2
|
||||||
|
SFL_SetHint(SDL_HINT_PS2_GS_MODE, "NTSC");
|
||||||
|
#elif dos
|
||||||
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 */
|
||||||
|
|
@ -273,7 +284,7 @@ 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 defined WIN32
|
#if windows
|
||||||
if(conf.Windows_AllocConsole == true){
|
if(conf.Windows_AllocConsole == true){
|
||||||
AllocConsole();
|
AllocConsole();
|
||||||
freopen("CONOUT$", "w", stdout);
|
freopen("CONOUT$", "w", stdout);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue