mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2026-04-04 20:27:44 -06:00
add opengl implementation and link to ui
This commit is contained in:
parent
8694533891
commit
367a38bdea
@ -320,10 +320,10 @@
|
||||
<item>
|
||||
<widget class="QCheckBox" name="toggle_skip_duplicate_frames">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Skips presenting duplicated frames in 30fps games. This allows external frame generation tools to work correctly in 30fps games. This does not boost performance.</p></body></html></string>
|
||||
<string><html><head/><body><p>This detects and skips the presentation of frames that are not unique. It also allows external frame generation tools to work correctly with 30fps games. Works in OpenGL and Vulkan.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Skip Duplicate Frame Display</string>
|
||||
<string>Skip Presenting Duplicate Frames</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@ -196,6 +196,7 @@ void RendererOpenGL::PrepareRendertarget() {
|
||||
void RendererOpenGL::RenderToMailbox(const Layout::FramebufferLayout& layout,
|
||||
std::unique_ptr<Frontend::TextureMailbox>& mailbox,
|
||||
bool flipped) {
|
||||
if ((Core::PerfStats::game_frames_updated && Settings::values.use_skip_duplicate_frames.GetValue()) || !Settings::values.use_skip_duplicate_frames.GetValue()){
|
||||
|
||||
Frontend::Frame* frame;
|
||||
{
|
||||
@ -241,6 +242,9 @@ void RendererOpenGL::RenderToMailbox(const Layout::FramebufferLayout& layout,
|
||||
glFlush();
|
||||
mailbox->ReleaseRenderFrame(frame);
|
||||
}
|
||||
|
||||
Core::PerfStats::game_frames_updated = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -236,7 +236,8 @@ void RendererVulkan::PrepareDraw(Frame* frame, const Layout::FramebufferLayout&
|
||||
|
||||
void RendererVulkan::RenderToWindow(PresentWindow& window, const Layout::FramebufferLayout& layout,
|
||||
bool flipped) {
|
||||
if (Core::PerfStats::game_frames_updated){
|
||||
|
||||
if ((Core::PerfStats::game_frames_updated && Settings::values.use_skip_duplicate_frames.GetValue()) || !Settings::values.use_skip_duplicate_frames.GetValue()){
|
||||
Frame* frame = window.GetRenderFrame();
|
||||
|
||||
if (layout.width != frame->width || layout.height != frame->height) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user