diff --git a/parallel-rdp-standalone/gfx_m64p.c b/parallel-rdp-standalone/gfx_m64p.c index ae919de..2c5e4e0 100644 --- a/parallel-rdp-standalone/gfx_m64p.c +++ b/parallel-rdp-standalone/gfx_m64p.c @@ -40,6 +40,7 @@ #define KEY_NATIVETEXTLOD "NativeTextLOD" #define KEY_DEINTERLACE "DeinterlaceMode" #define KEY_INTEGER "IntegerScale" +#define KEY_SYNCHRONOUS "SynchronousRDP" #include #include @@ -130,6 +131,7 @@ EXPORT m64p_error CALL PluginStartup(m64p_dynlib_handle _CoreLibHandle, void *Co ConfigSetDefaultInt(configVideoParallel, KEY_SCREEN_HEIGHT, 480, "Screen height"); ConfigSetDefaultBool(configVideoParallel, KEY_SSREADBACKS, 0, "Enable superscaling of readbacks when upsampling"); ConfigSetDefaultBool(configVideoParallel, KEY_SSDITHER, 1, "Enable superscaling of dithering when upsampling"); + ConfigSetDefaultBool(configVideoParallel, KEY_SYNCHRONOUS, 0, "Enable synchronizing RDP and CPU"); ConfigSetDefaultBool(configVideoParallel, KEY_DEINTERLACE, 0, "Deinterlacing method. Weave should only be used with 1x scaling factor. False=Bob, True=Weave"); ConfigSetDefaultBool(configVideoParallel, KEY_INTEGER, 0, "Enable integer scaling"); @@ -236,6 +238,8 @@ EXPORT int CALL RomOpen(void) vk_interlacing = ConfigGetParamBool(configVideoParallel, KEY_DEINTERLACE); vk_downscaling_steps = ConfigGetParamInt(configVideoParallel, KEY_DOWNSCALE); vk_overscan = ConfigGetParamInt(configVideoParallel, KEY_OVERSCANCROP); + + vk_synchronous = ConfigGetParamBool(configVideoParallel, KEY_SYNCHRONOUS); plugin_init(); vk_init(); diff --git a/parallel-rdp-standalone/parallel_imp.cpp b/parallel-rdp-standalone/parallel_imp.cpp index c1e6164..5206bd0 100644 --- a/parallel-rdp-standalone/parallel_imp.cpp +++ b/parallel-rdp-standalone/parallel_imp.cpp @@ -189,7 +189,7 @@ void vk_process_commands() if (RDP::Op(command) == RDP::Op::SyncFull) { // For synchronous RDP: - if (frontend) + if (vk_synchronous && frontend) frontend->wait_for_timeline(frontend->signal_timeline()); *gfx.MI_INTR_REG |= DP_INTERRUPT; gfx.CheckInterrupts(); @@ -244,7 +244,7 @@ bool vk_init() } device->set_context(*context); - device->init_frame_contexts(1); + device->init_frame_contexts(2); ::RDP::CommandProcessorFlags flags = 0; switch (vk_rescaling)