Skip to content

Commit

Permalink
Merge branch 'GreemDev:master' into dram-dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
KeatonTheBot authored Oct 21, 2024
2 parents d31874a + 8b75ce1 commit 1c26ca3
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
id: version_info
run: |
echo "build_version=${{ env.RYUJINX_BASE_VERSION }}.${{ github.run_number }}" >> $GITHUB_OUTPUT
echo "prev_build_version=${{ env.RYUJINX_BASE_VERSION }}.$((${{ github.run_number }} - 1))" >> $GITHUB_OUTPUT
shell: bash

- name: Create tag
Expand All @@ -51,6 +52,7 @@ jobs:
with:
name: ${{ steps.version_info.outputs.build_version }}
tag: ${{ steps.version_info.outputs.build_version }}
body: "**Full Changelog**: https://github.com/${{ github.repository }}/compare/${{ steps.version_info.outputs.prev_build_version }}...${{ steps.version_info.outputs.build_version }}"
omitBodyDuringUpdate: true
owner: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}
repo: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}
Expand Down Expand Up @@ -79,6 +81,7 @@ jobs:
id: version_info
run: |
echo "build_version=${{ env.RYUJINX_BASE_VERSION }}.${{ github.run_number }}" >> $GITHUB_OUTPUT
echo "prev_build_version=${{ env.RYUJINX_BASE_VERSION }}.$((${{ github.run_number }} - 1))" >> $GITHUB_OUTPUT
echo "git_short_hash=$(git rev-parse --short "${{ github.sha }}")" >> $GITHUB_OUTPUT
shell: bash

Expand Down Expand Up @@ -132,6 +135,7 @@ jobs:
name: ${{ steps.version_info.outputs.build_version }}
artifacts: "release_output/*.tar.gz,release_output/*.zip"
tag: ${{ steps.version_info.outputs.build_version }}
body: "**Full Changelog**: https://github.com/${{ github.repository }}/compare/${{ steps.version_info.outputs.prev_build_version }}...${{ steps.version_info.outputs.build_version }}"
omitBodyDuringUpdate: true
allowUpdates: true
replacesArtifacts: true
Expand Down Expand Up @@ -170,6 +174,7 @@ jobs:
id: version_info
run: |
echo "build_version=${{ env.RYUJINX_BASE_VERSION }}.${{ github.run_number }}" >> $GITHUB_OUTPUT
echo "prev_build_version=${{ env.RYUJINX_BASE_VERSION }}.$((${{ github.run_number }} - 1))" >> $GITHUB_OUTPUT
echo "git_short_hash=$(git rev-parse --short "${{ github.sha }}")" >> $GITHUB_OUTPUT
- name: Configure for release
Expand All @@ -196,6 +201,7 @@ jobs:
name: ${{ steps.version_info.outputs.build_version }}
artifacts: "publish_ava/*.tar.gz, publish_headless/*.tar.gz"
tag: ${{ steps.version_info.outputs.build_version }}
body: "**Full Changelog**: https://github.com/${{ github.repository }}/compare/${{ steps.version_info.outputs.prev_build_version }}...${{ steps.version_info.outputs.build_version }}"
omitBodyDuringUpdate: true
allowUpdates: true
replacesArtifacts: true
Expand Down
1 change: 1 addition & 0 deletions src/Ryujinx.Input.SDL2/SDL2Mouse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public void SetTriggerThreshold(float triggerThreshold)

public void Dispose()
{
GC.SuppressFinalize(this);
_driver = null;
}
}
Expand Down
1 change: 1 addition & 0 deletions src/Ryujinx.Input.SDL2/SDL2MouseDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ public void Dispose()
return;
}

GC.SuppressFinalize(this);
_isDisposed = true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Ryujinx.UI.Common/App/ApplicationData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace Ryujinx.UI.App.Common
{
public class ApplicationData
{
public static Func<string> LocalizedNever = () => "Never";
public static Func<string> LocalizedNever { get; set; } = () => "Never";

public bool Favorite { get; set; }
public byte[] Icon { get; set; }
Expand Down
6 changes: 3 additions & 3 deletions src/Ryujinx/AppHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -962,10 +962,10 @@ private void RenderLoop()
{
if (_viewModel.StartGamesInFullscreen)
{
_viewModel.WindowState = MainWindow.FullScreenWindowState;
_viewModel.WindowState = WindowState.FullScreen;
}
if (_viewModel.WindowState == MainWindow.FullScreenWindowState)
if (_viewModel.WindowState is WindowState.FullScreen)
{
_viewModel.ShowMenuAndStatusBar = false;
}
Expand Down Expand Up @@ -1136,7 +1136,7 @@ private bool UpdateFrame()

Dispatcher.UIThread.Post(() =>
{
if (_keyboardInterface.GetKeyboardStateSnapshot().IsPressed(Key.Delete) && _viewModel.WindowState != MainWindow.FullScreenWindowState)
if (_keyboardInterface.GetKeyboardStateSnapshot().IsPressed(Key.Delete) && _viewModel.WindowState is not WindowState.FullScreen)
{
Device.Processes.ActiveApplication.DiskCacheLoadState?.Cancel();
}
Expand Down
6 changes: 3 additions & 3 deletions src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1426,7 +1426,7 @@ public void ToggleDockMode()

public async Task ExitCurrentState()
{
if (WindowState == MainWindow.FullScreenWindowState)
if (WindowState is WindowState.FullScreen)
{
ToggleFullscreen();
}
Expand Down Expand Up @@ -1754,15 +1754,15 @@ public void ToggleFullscreen()
}
else
{
WindowState = MainWindow.FullScreenWindowState;
WindowState = WindowState.FullScreen;

if (IsGameRunning)
{
ShowMenuAndStatusBar = false;
}
}

IsFullScreen = WindowState == MainWindow.FullScreenWindowState;
IsFullScreen = WindowState is WindowState.FullScreen;
}

public static void SaveConfig()
Expand Down
12 changes: 2 additions & 10 deletions src/Ryujinx/UI/Windows/MainWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,6 @@ public partial class MainWindow : StyleableAppWindow
public readonly double StatusBarHeight;
public readonly double MenuBarHeight;

// The special window decoration from AppWindow in FluentAvalonia is only present on Windows;
// and as such optimizing for the fact that the menu bar and the title bar are the same is only needed on Windows.
// Maximized is considered superior to FullScreen on Windows in this case because you get the benefits of being in full screen,
// while still being able to use the standard 3 window controls in the top right to minimize, make the window smaller, or close the app.

public static readonly WindowState FullScreenWindowState =
OperatingSystem.IsWindows() ? WindowState.Maximized : WindowState.FullScreen;

public MainWindow()
{
DataContext = ViewModel = new MainWindowViewModel
Expand Down Expand Up @@ -193,7 +185,7 @@ public void SwitchToGameControl(bool startFullscreen = false)
ViewModel.ShowContent = true;
ViewModel.IsLoadingIndeterminate = false;

if (startFullscreen && ViewModel.WindowState != MainWindow.FullScreenWindowState)
if (startFullscreen && ViewModel.WindowState is not WindowState.FullScreen)
{
ViewModel.ToggleFullscreen();
}
Expand All @@ -205,7 +197,7 @@ public void ShowLoading(bool startFullscreen = false)
ViewModel.ShowLoadProgress = true;
ViewModel.IsLoadingIndeterminate = true;

if (startFullscreen && ViewModel.WindowState != MainWindow.FullScreenWindowState)
if (startFullscreen && ViewModel.WindowState is not WindowState.FullScreen)
{
ViewModel.ToggleFullscreen();
}
Expand Down

0 comments on commit 1c26ca3

Please sign in to comment.