Sex Gay
This commit is contained in:
parent
24380ac4eb
commit
6bcf17ea55
|
|
@ -582,12 +582,7 @@ static void mriBindingExecute(){
|
||||||
* but not doing it will lead to crashes due to closed
|
* but not doing it will lead to crashes due to closed
|
||||||
* stdio streams on some platforms (eg. Windows) */
|
* stdio streams on some platforms (eg. Windows) */
|
||||||
int argc = 0;
|
int argc = 0;
|
||||||
<<<<<<< HEAD
|
|
||||||
char **argv = 0;
|
char **argv = 0;
|
||||||
=======
|
|
||||||
char **argv = nullptr;
|
|
||||||
//options_argv3[] = "--jit"
|
|
||||||
>>>>>>> b9cd221a9e6e6586cc4ca23a2b2d315b074f14e7
|
|
||||||
char options_argv1[] = "oneshot", options_argv2[] = "-ev";
|
char options_argv1[] = "oneshot", options_argv2[] = "-ev";
|
||||||
char* options_argv[] = {options_argv1, options_argv2, NULL};
|
char* options_argv[] = {options_argv1, options_argv2, NULL};
|
||||||
ruby_sysinit(&argc, &argv);
|
ruby_sysinit(&argc, &argv);
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,15 @@ RB_METHOD(graphicsWait){
|
||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RB_METHOD(graphicsSetVsync){
|
||||||
|
RB_UNUSED_PARAM;
|
||||||
|
int xuinia_ebania;
|
||||||
|
rb_get_args(argc, argv, "i", &xuinia_ebania RB_ARG_END);
|
||||||
|
shState->graphics().setVsync(xuinia_ebania);
|
||||||
|
|
||||||
|
return Qnil;
|
||||||
|
}
|
||||||
|
|
||||||
RB_METHOD(graphicsFadeout){
|
RB_METHOD(graphicsFadeout){
|
||||||
RB_UNUSED_PARAM;
|
RB_UNUSED_PARAM;
|
||||||
|
|
||||||
|
|
@ -284,7 +293,7 @@ void graphicsBindingInit(){
|
||||||
_rb_define_module_function(module, "freeze", graphicsFreeze);
|
_rb_define_module_function(module, "freeze", graphicsFreeze);
|
||||||
_rb_define_module_function(module, "transition", graphicsTransition);
|
_rb_define_module_function(module, "transition", graphicsTransition);
|
||||||
_rb_define_module_function(module, "frame_reset", graphicsFrameReset);
|
_rb_define_module_function(module, "frame_reset", graphicsFrameReset);
|
||||||
|
_rb_define_module_function(module, "setVsync", graphicsSetVsync);
|
||||||
_rb_define_module_function(module, "__reset__", graphicsReset);
|
_rb_define_module_function(module, "__reset__", graphicsReset);
|
||||||
|
|
||||||
// Variables
|
// Variables
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ module Settings
|
||||||
:twm_shader => true,
|
:twm_shader => true,
|
||||||
:light => true,
|
:light => true,
|
||||||
:scaling_mode => 0,
|
:scaling_mode => 0,
|
||||||
|
:vsync => 0,
|
||||||
|
|
||||||
# UI
|
# UI
|
||||||
:in_game_timer => false,
|
:in_game_timer => false,
|
||||||
|
|
@ -205,6 +206,12 @@ class Window_Settings
|
||||||
:parameter => :scaling_mode,
|
:parameter => :scaling_mode,
|
||||||
:values => ["Nearest Neighbor", "Smooth(old)"]
|
:values => ["Nearest Neighbor", "Smooth(old)"]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
:type => :enum,
|
||||||
|
:name => "Vsync mode",
|
||||||
|
:parameter => :vsync,
|
||||||
|
:values => ["Normal", "Adaptive", "Disabled"]
|
||||||
|
},
|
||||||
{ :type => :sep, :name => "Effects"},
|
{ :type => :sep, :name => "Effects"},
|
||||||
{
|
{
|
||||||
:type => :bool,
|
:type => :bool,
|
||||||
|
|
@ -517,37 +524,37 @@ class Window_Settings
|
||||||
{
|
{
|
||||||
:type => :bool,
|
:type => :bool,
|
||||||
:name => "Show debug character",
|
:name => "Show debug character",
|
||||||
:parameter => :debug_character
|
:parameter => :debug_character,
|
||||||
:icon => [1, 0],
|
:icon => [1, 0],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:type => :bool,
|
:type => :bool,
|
||||||
:name => "Draw debug text in main menu",
|
:name => "Draw debug text in main menu",
|
||||||
:parameter => :debug_text_scene_title
|
:parameter => :debug_text_scene_title,
|
||||||
:icon => [1, 0],
|
:icon => [1, 0],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:type => :bool,
|
:type => :bool,
|
||||||
:name => "Show debug text",
|
:name => "Show debug text",
|
||||||
:parameter => :debug_text
|
:parameter => :debug_text,
|
||||||
:icon => [1, 0],
|
:icon => [1, 0],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:type => :bool,
|
:type => :bool,
|
||||||
:name => "Show picture names",
|
:name => "Show picture names",
|
||||||
:parameter => :debug_picture_names
|
:parameter => :debug_picture_names,
|
||||||
:icon => [1, 0],
|
:icon => [1, 0],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:type => :bool,
|
:type => :bool,
|
||||||
:name => "Debug lightmap",
|
:name => "Debug lightmap",
|
||||||
:parameter => :debug_lightmap
|
:parameter => :debug_lightmap,
|
||||||
:icon => [1, 0],
|
:icon => [1, 0],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:type => :bool,
|
:type => :bool,
|
||||||
:name => "SDL_HINT_SHUTDOWN_DBUS_ON_QUIT",
|
:name => "SDL_HINT_SHUTDOWN_DBUS_ON_QUIT",
|
||||||
:parameter => :SDL_HINT_SHUTDOWN_DBUS_ON_QUIT
|
:parameter => :SDL_HINT_SHUTDOWN_DBUS_ON_QUIT,
|
||||||
:icon => [1, 0],
|
:icon => [1, 0],
|
||||||
},
|
},
|
||||||
{ :type => :sep },
|
{ :type => :sep },
|
||||||
|
|
@ -555,14 +562,14 @@ class Window_Settings
|
||||||
:type => :key,
|
:type => :key,
|
||||||
:name => "Debug",
|
:name => "Debug",
|
||||||
:parameter => :controls_debug,
|
:parameter => :controls_debug,
|
||||||
:bind => Input::DEBUGACTION
|
:bind => Input::DEBUGACTION,
|
||||||
:icon => [1, 0],
|
:icon => [1, 0],
|
||||||
},
|
},
|
||||||
{ :type => :sep },
|
{ :type => :sep },
|
||||||
{
|
{
|
||||||
:type => :action,
|
:type => :action,
|
||||||
:name => "Clear image cache",
|
:name => "Clear image cache",
|
||||||
:action => Proc.new { RPG::Cache.clear }
|
:action => Proc.new { RPG::Cache.clear },
|
||||||
:icon => [1, 0],
|
:icon => [1, 0],
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ begin
|
||||||
Font.default_size = 20
|
Font.default_size = 20
|
||||||
#debug shit
|
#debug shit
|
||||||
Input.set_led(255, 150, 30)
|
Input.set_led(255, 150, 30)
|
||||||
|
|
||||||
# Load persistent data
|
# Load persistent data
|
||||||
Persistent.load
|
Persistent.load
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,16 @@ module Settings
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def vsync(value)
|
||||||
|
if value == 0
|
||||||
|
Graphics.setVsync(1)
|
||||||
|
elsif value == 1
|
||||||
|
Graphics.setVsync(-1)
|
||||||
|
else
|
||||||
|
Graphics.setVsync(0)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def SDL_HINT_SHUTDOWN_DBUS_ON_QUIT(value)
|
def SDL_HINT_SHUTDOWN_DBUS_ON_QUIT(value)
|
||||||
if value
|
if value
|
||||||
Sunshine.setSDLHint("SDL_HINT_SHUTDOWN_DBUS_ON_QUIT", "1")
|
Sunshine.setSDLHint("SDL_HINT_SHUTDOWN_DBUS_ON_QUIT", "1")
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@
|
||||||
#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 <SDL3/SDL_stdinc.h>
|
||||||
|
#include <SDL3/SDL_video.h>
|
||||||
|
|
||||||
#include "sharedstate.h"
|
#include "sharedstate.h"
|
||||||
#include "graphics.h"
|
#include "graphics.h"
|
||||||
|
|
@ -84,6 +85,7 @@ enum{
|
||||||
REQUEST_WINMOVETO,
|
REQUEST_WINMOVETO,
|
||||||
REQUEST_MESSAGEBOX,
|
REQUEST_MESSAGEBOX,
|
||||||
REQUEST_SETCURSORVISIBLE,
|
REQUEST_SETCURSORVISIBLE,
|
||||||
|
REQUEST_VSYNC,
|
||||||
|
|
||||||
UPDATE_FPS,
|
UPDATE_FPS,
|
||||||
UPDATE_SCREEN_RECT,
|
UPDATE_SCREEN_RECT,
|
||||||
|
|
@ -96,15 +98,13 @@ SDL_Gamepad* gc = nullptr;
|
||||||
|
|
||||||
bool EventThread::allocUserEvents(){
|
bool EventThread::allocUserEvents(){
|
||||||
usrIdStart = SDL_RegisterEvents(EVENT_COUNT);
|
usrIdStart = SDL_RegisterEvents(EVENT_COUNT);
|
||||||
// SDL_RegisterEvents() now returns 0 if it couldn't allocate any user events.
|
|
||||||
if (usrIdStart == (uint32_t) 0)
|
if (usrIdStart == (uint32_t) 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
EventThread::EventThread()
|
EventThread::EventThread(): fullscreen(false), showCursor(true){}
|
||||||
: fullscreen(false), showCursor(true){}
|
|
||||||
|
|
||||||
void EventThread::process(RGSSThreadData &rtData){
|
void EventThread::process(RGSSThreadData &rtData){
|
||||||
SDL_Event event;
|
SDL_Event event;
|
||||||
|
|
@ -412,8 +412,10 @@ void EventThread::process(RGSSThreadData &rtData){
|
||||||
|
|
||||||
default :
|
default :
|
||||||
/* Handle user events */
|
/* Handle user events */
|
||||||
switch(event.type - usrIdStart)
|
switch(event.type - usrIdStart){
|
||||||
{
|
case REQUEST_VSYNC:
|
||||||
|
SDL_GL_SetSwapInterval(event.user.code);
|
||||||
|
break;
|
||||||
case REQUEST_SETFULLSCREEN :
|
case REQUEST_SETFULLSCREEN :
|
||||||
setFullscreen(win, static_cast<bool>(event.user.code));
|
setFullscreen(win, static_cast<bool>(event.user.code));
|
||||||
break;
|
break;
|
||||||
|
|
@ -511,10 +513,6 @@ bool EventThread::eventFilter(void *data, SDL_Event *event){
|
||||||
Debug() << "SDL_EVENT_TERMINATING";
|
Debug() << "SDL_EVENT_TERMINATING";
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case SDL_EVENT_LOW_MEMORY :
|
|
||||||
Debug() << "SDL_EVENT_LOW_MEMORY";
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
/* Workaround for Windows pausing on drag */
|
/* Workaround for Windows pausing on drag */
|
||||||
default:
|
default:
|
||||||
if (event->window.type == SDL_EVENT_WINDOW_MOVED){
|
if (event->window.type == SDL_EVENT_WINDOW_MOVED){
|
||||||
|
|
@ -579,6 +577,13 @@ void EventThread::requestFullscreenMode(bool mode){
|
||||||
SDL_PushEvent(&event);
|
SDL_PushEvent(&event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EventThread::requestVsync(int interval){
|
||||||
|
SDL_Event event;
|
||||||
|
event.type = usrIdStart + REQUEST_VSYNC;
|
||||||
|
event.user.code = interval;
|
||||||
|
SDL_PushEvent(&event);
|
||||||
|
}
|
||||||
|
|
||||||
void EventThread::requestWindowMove(int x, int y){
|
void EventThread::requestWindowMove(int x, int y){
|
||||||
SDL_Event event;
|
SDL_Event event;
|
||||||
event.type = usrIdStart + REQUEST_WINMOVETO;
|
event.type = usrIdStart + REQUEST_WINMOVETO;
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,7 @@ public:
|
||||||
void requestWindowMove(int x, int y);
|
void requestWindowMove(int x, int y);
|
||||||
void requestWindowResize(int width, int height);
|
void requestWindowResize(int width, int height);
|
||||||
void requestShowCursor(bool mode);
|
void requestShowCursor(bool mode);
|
||||||
|
void requestVsync(int interval);
|
||||||
|
|
||||||
void requestTerminate();
|
void requestTerminate();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -958,6 +958,10 @@ void Graphics::setFullscreen(bool value){
|
||||||
p->threadData->ethread->requestFullscreenMode(value);
|
p->threadData->ethread->requestFullscreenMode(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Graphics::setVsync(int value){
|
||||||
|
p->threadData->ethread->requestVsync(value);
|
||||||
|
}
|
||||||
|
|
||||||
bool Graphics::getSmooth() const{
|
bool Graphics::getSmooth() const{
|
||||||
return p->threadData->config.smoothScaling;
|
return p->threadData->config.smoothScaling;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,8 @@ public:
|
||||||
|
|
||||||
void reset();
|
void reset();
|
||||||
|
|
||||||
|
void setVsync(int value);
|
||||||
|
|
||||||
/* Non-standard extension */
|
/* Non-standard extension */
|
||||||
DECL_ATTR( Fullscreen, bool )
|
DECL_ATTR( Fullscreen, bool )
|
||||||
DECL_ATTR( ShowCursor, bool )
|
DECL_ATTR( ShowCursor, bool )
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue