Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Visual Studio
.vs/
bin/
obj/
Expand All @@ -6,6 +7,9 @@ obj/
.DS_Store
TestResults

AppPackages/
BundleArtifacts/

# User-specific files
*.suo
*.user
Expand Down
92 changes: 34 additions & 58 deletions RunCat365.sln
Original file line number Diff line number Diff line change
@@ -1,81 +1,57 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.2.32616.157
VisualStudioVersion = 17.14.36301.6
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RunCat365", "RunCat365\RunCat365.csproj", "{10064461-1376-41CF-B6DA-A67B71BB2AC9}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RunCat365", "RunCat365\RunCat365.csproj", "{CE0ABB30-977D-4DBC-8B69-EC9D6BD72000}"
EndProject
Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "WapForStore", "WapForStore\WapForStore.wapproj", "{52986C4C-A3D1-4430-8395-1D457C258E28}"
Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "WapForStore", "WapForStore\WapForStore.wapproj", "{5B865D12-1A70-4311-8EBA-010E117FE616}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|ARM64 = Debug|ARM64
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|ARM64 = Release|ARM64
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{10064461-1376-41CF-B6DA-A67B71BB2AC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{10064461-1376-41CF-B6DA-A67B71BB2AC9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{10064461-1376-41CF-B6DA-A67B71BB2AC9}.Debug|ARM.ActiveCfg = Debug|Any CPU
{10064461-1376-41CF-B6DA-A67B71BB2AC9}.Debug|ARM.Build.0 = Debug|Any CPU
{10064461-1376-41CF-B6DA-A67B71BB2AC9}.Debug|ARM64.ActiveCfg = Debug|ARM64
{10064461-1376-41CF-B6DA-A67B71BB2AC9}.Debug|ARM64.Build.0 = Debug|ARM64
{10064461-1376-41CF-B6DA-A67B71BB2AC9}.Debug|x64.ActiveCfg = Debug|x64
{10064461-1376-41CF-B6DA-A67B71BB2AC9}.Debug|x64.Build.0 = Debug|x64
{10064461-1376-41CF-B6DA-A67B71BB2AC9}.Debug|x86.ActiveCfg = Debug|Any CPU
{10064461-1376-41CF-B6DA-A67B71BB2AC9}.Debug|x86.Build.0 = Debug|Any CPU
{10064461-1376-41CF-B6DA-A67B71BB2AC9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{10064461-1376-41CF-B6DA-A67B71BB2AC9}.Release|Any CPU.Build.0 = Release|Any CPU
{10064461-1376-41CF-B6DA-A67B71BB2AC9}.Release|ARM.ActiveCfg = Release|Any CPU
{10064461-1376-41CF-B6DA-A67B71BB2AC9}.Release|ARM.Build.0 = Release|Any CPU
{10064461-1376-41CF-B6DA-A67B71BB2AC9}.Release|ARM64.ActiveCfg = Release|ARM64
{10064461-1376-41CF-B6DA-A67B71BB2AC9}.Release|ARM64.Build.0 = Release|ARM64
{10064461-1376-41CF-B6DA-A67B71BB2AC9}.Release|x64.ActiveCfg = Release|x64
{10064461-1376-41CF-B6DA-A67B71BB2AC9}.Release|x64.Build.0 = Release|x64
{10064461-1376-41CF-B6DA-A67B71BB2AC9}.Release|x86.ActiveCfg = Release|Any CPU
{10064461-1376-41CF-B6DA-A67B71BB2AC9}.Release|x86.Build.0 = Release|Any CPU
{52986C4C-A3D1-4430-8395-1D457C258E28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{52986C4C-A3D1-4430-8395-1D457C258E28}.Debug|Any CPU.Build.0 = Debug|Any CPU
{52986C4C-A3D1-4430-8395-1D457C258E28}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{52986C4C-A3D1-4430-8395-1D457C258E28}.Debug|ARM.ActiveCfg = Debug|ARM
{52986C4C-A3D1-4430-8395-1D457C258E28}.Debug|ARM.Build.0 = Debug|ARM
{52986C4C-A3D1-4430-8395-1D457C258E28}.Debug|ARM.Deploy.0 = Debug|ARM
{52986C4C-A3D1-4430-8395-1D457C258E28}.Debug|ARM64.ActiveCfg = Debug|ARM64
{52986C4C-A3D1-4430-8395-1D457C258E28}.Debug|ARM64.Build.0 = Debug|ARM64
{52986C4C-A3D1-4430-8395-1D457C258E28}.Debug|ARM64.Deploy.0 = Debug|ARM64
{52986C4C-A3D1-4430-8395-1D457C258E28}.Debug|x64.ActiveCfg = Debug|x64
{52986C4C-A3D1-4430-8395-1D457C258E28}.Debug|x64.Build.0 = Debug|x64
{52986C4C-A3D1-4430-8395-1D457C258E28}.Debug|x64.Deploy.0 = Debug|x64
{52986C4C-A3D1-4430-8395-1D457C258E28}.Debug|x86.ActiveCfg = Debug|x86
{52986C4C-A3D1-4430-8395-1D457C258E28}.Debug|x86.Build.0 = Debug|x86
{52986C4C-A3D1-4430-8395-1D457C258E28}.Debug|x86.Deploy.0 = Debug|x86
{52986C4C-A3D1-4430-8395-1D457C258E28}.Release|Any CPU.ActiveCfg = Release|Any CPU
{52986C4C-A3D1-4430-8395-1D457C258E28}.Release|Any CPU.Build.0 = Release|Any CPU
{52986C4C-A3D1-4430-8395-1D457C258E28}.Release|Any CPU.Deploy.0 = Release|Any CPU
{52986C4C-A3D1-4430-8395-1D457C258E28}.Release|ARM.ActiveCfg = Release|ARM
{52986C4C-A3D1-4430-8395-1D457C258E28}.Release|ARM.Build.0 = Release|ARM
{52986C4C-A3D1-4430-8395-1D457C258E28}.Release|ARM.Deploy.0 = Release|ARM
{52986C4C-A3D1-4430-8395-1D457C258E28}.Release|ARM64.ActiveCfg = Release|ARM64
{52986C4C-A3D1-4430-8395-1D457C258E28}.Release|ARM64.Build.0 = Release|ARM64
{52986C4C-A3D1-4430-8395-1D457C258E28}.Release|ARM64.Deploy.0 = Release|ARM64
{52986C4C-A3D1-4430-8395-1D457C258E28}.Release|x64.ActiveCfg = Release|x64
{52986C4C-A3D1-4430-8395-1D457C258E28}.Release|x64.Build.0 = Release|x64
{52986C4C-A3D1-4430-8395-1D457C258E28}.Release|x64.Deploy.0 = Release|x64
{52986C4C-A3D1-4430-8395-1D457C258E28}.Release|x86.ActiveCfg = Release|x86
{52986C4C-A3D1-4430-8395-1D457C258E28}.Release|x86.Build.0 = Release|x86
{52986C4C-A3D1-4430-8395-1D457C258E28}.Release|x86.Deploy.0 = Release|x86
{CE0ABB30-977D-4DBC-8B69-EC9D6BD72000}.Debug|ARM64.ActiveCfg = Debug|ARM64
{CE0ABB30-977D-4DBC-8B69-EC9D6BD72000}.Debug|ARM64.Build.0 = Debug|ARM64
{CE0ABB30-977D-4DBC-8B69-EC9D6BD72000}.Debug|x64.ActiveCfg = Debug|x64
{CE0ABB30-977D-4DBC-8B69-EC9D6BD72000}.Debug|x64.Build.0 = Debug|x64
{CE0ABB30-977D-4DBC-8B69-EC9D6BD72000}.Debug|x86.ActiveCfg = Debug|x86
{CE0ABB30-977D-4DBC-8B69-EC9D6BD72000}.Debug|x86.Build.0 = Debug|x86
{CE0ABB30-977D-4DBC-8B69-EC9D6BD72000}.Release|ARM64.ActiveCfg = Release|ARM64
{CE0ABB30-977D-4DBC-8B69-EC9D6BD72000}.Release|ARM64.Build.0 = Release|ARM64
{CE0ABB30-977D-4DBC-8B69-EC9D6BD72000}.Release|x64.ActiveCfg = Release|x64
{CE0ABB30-977D-4DBC-8B69-EC9D6BD72000}.Release|x64.Build.0 = Release|x64
{CE0ABB30-977D-4DBC-8B69-EC9D6BD72000}.Release|x86.ActiveCfg = Release|x86
{CE0ABB30-977D-4DBC-8B69-EC9D6BD72000}.Release|x86.Build.0 = Release|x86
{5B865D12-1A70-4311-8EBA-010E117FE616}.Debug|ARM64.ActiveCfg = Debug|ARM64
{5B865D12-1A70-4311-8EBA-010E117FE616}.Debug|ARM64.Build.0 = Debug|ARM64
{5B865D12-1A70-4311-8EBA-010E117FE616}.Debug|ARM64.Deploy.0 = Debug|ARM64
{5B865D12-1A70-4311-8EBA-010E117FE616}.Debug|x64.ActiveCfg = Debug|x64
{5B865D12-1A70-4311-8EBA-010E117FE616}.Debug|x64.Build.0 = Debug|x64
{5B865D12-1A70-4311-8EBA-010E117FE616}.Debug|x64.Deploy.0 = Debug|x64
{5B865D12-1A70-4311-8EBA-010E117FE616}.Debug|x86.ActiveCfg = Debug|x86
{5B865D12-1A70-4311-8EBA-010E117FE616}.Debug|x86.Build.0 = Debug|x86
{5B865D12-1A70-4311-8EBA-010E117FE616}.Debug|x86.Deploy.0 = Debug|x86
{5B865D12-1A70-4311-8EBA-010E117FE616}.Release|ARM64.ActiveCfg = Release|ARM64
{5B865D12-1A70-4311-8EBA-010E117FE616}.Release|ARM64.Build.0 = Release|ARM64
{5B865D12-1A70-4311-8EBA-010E117FE616}.Release|ARM64.Deploy.0 = Release|ARM64
{5B865D12-1A70-4311-8EBA-010E117FE616}.Release|x64.ActiveCfg = Release|x64
{5B865D12-1A70-4311-8EBA-010E117FE616}.Release|x64.Build.0 = Release|x64
{5B865D12-1A70-4311-8EBA-010E117FE616}.Release|x64.Deploy.0 = Release|x64
{5B865D12-1A70-4311-8EBA-010E117FE616}.Release|x86.ActiveCfg = Release|x86
{5B865D12-1A70-4311-8EBA-010E117FE616}.Release|x86.Build.0 = Release|x86
{5B865D12-1A70-4311-8EBA-010E117FE616}.Release|x86.Deploy.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7D6F6313-0157-43AE-8251-D67756F32A48}
SolutionGuid = {04BCEA3C-C8B1-4028-A4AD-6C50E8210E5B}
EndGlobalSection
EndGlobal
2 changes: 1 addition & 1 deletion RunCat365/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
</setting>
</RunCat365.Properties.UserSettings>
</userSettings>
</configuration>
</configuration>
Binary file added RunCat365/AppIcon.ico
Binary file not shown.
73 changes: 36 additions & 37 deletions RunCat365/FPSMaxLimit.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
namespace RunCat365
// Copyright 2020 Takuto Nakamura
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

namespace RunCat365
{
enum FPSMaxLimit
{
Expand All @@ -12,56 +26,41 @@ static class FPSMaxLimitExtensions
{
internal static string GetString(this FPSMaxLimit fpsMaxLimit)
{
switch (fpsMaxLimit)
return fpsMaxLimit switch
{
case FPSMaxLimit.FPS40:
return "40fps";
case FPSMaxLimit.FPS30:
return "30fps";
case FPSMaxLimit.FPS20:
return "20fps";
case FPSMaxLimit.FPS10:
return "10fps";
default:
return "";
}
FPSMaxLimit.FPS40 => "40fps",
FPSMaxLimit.FPS30 => "30fps",
FPSMaxLimit.FPS20 => "20fps",
FPSMaxLimit.FPS10 => "10fps",
_ => "",
};
}

internal static float GetRate(this FPSMaxLimit fPSMaxLimit)
{
switch (fPSMaxLimit)
return fPSMaxLimit switch
{
case FPSMaxLimit.FPS40:
return 1f;
case FPSMaxLimit.FPS30:
return 0.75f;
case FPSMaxLimit.FPS20:
return 0.5f;
case FPSMaxLimit.FPS10:
return 0.25f;
default:
return 1f;
}
FPSMaxLimit.FPS40 => 1f,
FPSMaxLimit.FPS30 => 0.75f,
FPSMaxLimit.FPS20 => 0.5f,
FPSMaxLimit.FPS10 => 0.25f,
_ => 1f,
};
}
}

static class _FPSMaxLimit
{
internal static FPSMaxLimit Parse(string value)
{
switch (value)
return value switch
{
case "40fps":
return FPSMaxLimit.FPS40;
case "30fps":
return FPSMaxLimit.FPS30;
case "20fps":
return FPSMaxLimit.FPS20;
case "10fps":
return FPSMaxLimit.FPS10;
default:
return FPSMaxLimit.FPS40;
}
"40fps" => FPSMaxLimit.FPS40,
"30fps" => FPSMaxLimit.FPS30,
"20fps" => FPSMaxLimit.FPS20,
"10fps" => FPSMaxLimit.FPS10,
_ => FPSMaxLimit.FPS40,
};
}
}
}
Loading