Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Ryujinx
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tartifless
Ryujinx
Commits
1fbb0d8e
Commit
1fbb0d8e
authored
2 months ago
by
Evan Husted
Browse files
Options
Downloads
Patches
Plain Diff
metal: also disable vsync for custom refresh rates
parent
9ee3f1ff
No related branches found
Branches containing commit
Tags
Canary-1.2.168
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Ryujinx.Graphics.Metal/Window.cs
+7
-13
7 additions, 13 deletions
src/Ryujinx.Graphics.Metal/Window.cs
with
7 additions
and
13 deletions
src/Ryujinx.Graphics.Metal/Window.cs
+
7
−
13
View file @
1fbb0d8e
...
...
@@ -22,13 +22,15 @@ namespace Ryujinx.Graphics.Metal
private
int
_requestedWidth
;
private
int
_requestedHeight
;
// private bool _vsyncEnabled;
private
AntiAliasing
_currentAntiAliasing
;
private
bool
_updateEffect
;
private
IPostProcessingEffect
_effect
;
private
IScalingFilter
_scalingFilter
;
private
bool
_isLinear
;
public
bool
IsVSyncEnabled
=>
_metalLayer
.
DisplaySyncEnabled
;
// private float _scalingFilterLevel;
private
bool
_updateScalingFilter
;
private
ScalingFilter
_currentScalingFilter
;
...
...
@@ -40,7 +42,7 @@ namespace Ryujinx.Graphics.Metal
_metalLayer
=
metalLayer
;
}
private
unsafe
void
ResizeIfNeeded
()
private
void
ResizeIfNeeded
()
{
if
(
_requestedWidth
!=
0
&&
_requestedHeight
!=
0
)
{
...
...
@@ -54,7 +56,7 @@ namespace Ryujinx.Graphics.Metal
}
}
public
unsafe
void
Present
(
ITexture
texture
,
ImageCrop
crop
,
Action
swapBuffersCallback
)
public
void
Present
(
ITexture
texture
,
ImageCrop
crop
,
Action
swapBuffersCallback
)
{
if
(
_renderer
.
Pipeline
is
Pipeline
pipeline
&&
texture
is
Texture
tex
)
{
...
...
@@ -141,15 +143,7 @@ namespace Ryujinx.Graphics.Metal
public
void
ChangeVSyncMode
(
VSyncMode
vSyncMode
)
{
switch
(
vSyncMode
)
{
case
VSyncMode
.
Unbounded
:
_metalLayer
.
DisplaySyncEnabled
=
false
;
break
;
case
VSyncMode
.
Switch
:
_metalLayer
.
DisplaySyncEnabled
=
true
;
break
;
}
_metalLayer
.
DisplaySyncEnabled
=
vSyncMode
is
VSyncMode
.
Switch
;
}
public
void
SetAntiAliasing
(
AntiAliasing
effect
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment