Multihawk begone!
|
@ -1,6 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<configuration>
|
|
||||||
<startup>
|
|
||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
|
|
||||||
</startup>
|
|
||||||
</configuration>
|
|
|
@ -1,250 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<OutputPath>..\output\</OutputPath>
|
|
||||||
<DefineConstants>TRACE;DEBUG;WINDOWS</DefineConstants>
|
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<!--<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>-->
|
|
||||||
<CodeAnalysisRuleSet Condition=" '$(OS)' == 'Windows_NT' ">MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
|
|
||||||
<OutputPath>..\output\</OutputPath>
|
|
||||||
<DefineConstants>TRACE;WINDOWS</DefineConstants>
|
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<!--<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>-->
|
|
||||||
<CodeAnalysisRuleSet Condition=" '$(OS)' == 'Windows_NT' ">MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
|
||||||
<PropertyGroup>
|
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
||||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
|
||||||
<ProjectGuid>{B95649F5-A0AE-41EB-B62B-578A2AFF5E18}</ProjectGuid>
|
|
||||||
<OutputType>WinExe</OutputType>
|
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
|
||||||
<RootNamespace>BizHawk.Client.MultiHawk</RootNamespace>
|
|
||||||
<AssemblyName>MultiHawk</AssemblyName>
|
|
||||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
|
||||||
<FileAlignment>512</FileAlignment>
|
|
||||||
<TargetFrameworkProfile />
|
|
||||||
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
|
|
||||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Reference Include="Microsoft.VisualBasic" />
|
|
||||||
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
|
||||||
<SpecificVersion>False</SpecificVersion>
|
|
||||||
<HintPath>..\References\Newtonsoft.Json.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="OpenTK">
|
|
||||||
<HintPath>..\References\OpenTK.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="SlimDX, Version=4.0.13.43, Culture=neutral, PublicKeyToken=b1b0c32fd1ffe4f9, processorArchitecture=AMD64">
|
|
||||||
<SpecificVersion>False</SpecificVersion>
|
|
||||||
<HintPath>..\References\x64\SlimDX.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System" />
|
|
||||||
<Reference Include="System.Core" />
|
|
||||||
<Reference Include="System.Xml.Linq" />
|
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
|
||||||
<Reference Include="Microsoft.CSharp" />
|
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.Deployment" />
|
|
||||||
<Reference Include="System.Drawing" />
|
|
||||||
<Reference Include="System.Windows.Forms" />
|
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="movie\PlayMovie.cs">
|
|
||||||
<SubType>Form</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="movie\PlayMovie.Designer.cs">
|
|
||||||
<DependentUpon>PlayMovie.cs</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="movie\RecordMovie.cs">
|
|
||||||
<SubType>Form</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="movie\RecordMovie.Designer.cs">
|
|
||||||
<DependentUpon>RecordMovie.cs</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="DisplayManager\DisplayManager.cs" />
|
|
||||||
<Compile Include="EmulatorWindow.cs">
|
|
||||||
<SubType>Form</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="EmulatorWindow.Designer.cs">
|
|
||||||
<DependentUpon>EmulatorWindow.cs</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="GlobalWin.cs" />
|
|
||||||
<Compile Include="InputManager.cs" />
|
|
||||||
<Compile Include="Input\GamePad.cs" />
|
|
||||||
<Compile Include="Input\Input.cs" />
|
|
||||||
<Compile Include="Input\Keyboard.cs" />
|
|
||||||
<Compile Include="Mainform.cs">
|
|
||||||
<SubType>Form</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Mainform.Designer.cs">
|
|
||||||
<DependentUpon>Mainform.cs</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="PresentationPanel.cs" />
|
|
||||||
<Compile Include="Program.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
||||||
<Compile Include="EmulatorWindowList.cs" />
|
|
||||||
<Compile Include="Extensions\ToolExtensions.cs" />
|
|
||||||
<EmbeddedResource Include="movie\PlayMovie.resx">
|
|
||||||
<DependentUpon>PlayMovie.cs</DependentUpon>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<EmbeddedResource Include="movie\RecordMovie.resx">
|
|
||||||
<DependentUpon>RecordMovie.cs</DependentUpon>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<EmbeddedResource Include="EmulatorWindow.resx">
|
|
||||||
<DependentUpon>EmulatorWindow.cs</DependentUpon>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<EmbeddedResource Include="Mainform.resx">
|
|
||||||
<DependentUpon>Mainform.cs</DependentUpon>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<EmbeddedResource Include="Properties\Resources.resx">
|
|
||||||
<Generator>ResXFileCodeGenerator</Generator>
|
|
||||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<Compile Include="Properties\Resources.Designer.cs">
|
|
||||||
<AutoGen>True</AutoGen>
|
|
||||||
<DependentUpon>Resources.resx</DependentUpon>
|
|
||||||
<DesignTime>True</DesignTime>
|
|
||||||
</Compile>
|
|
||||||
<None Include="Properties\Settings.settings">
|
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
|
||||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
|
||||||
</None>
|
|
||||||
<Compile Include="Properties\Settings.Designer.cs">
|
|
||||||
<AutoGen>True</AutoGen>
|
|
||||||
<DependentUpon>Settings.settings</DependentUpon>
|
|
||||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
|
||||||
</Compile>
|
|
||||||
<None Include="Resources\courier16px.bmfc" />
|
|
||||||
<None Include="Resources\courier16px.fnt" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="App.config" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\BizHawk.Client.Common\BizHawk.Client.Common.csproj">
|
|
||||||
<Project>{24a0aa3c-b25f-4197-b23d-476d6462dba0}</Project>
|
|
||||||
<Name>BizHawk.Client.Common</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\BizHawk.Client.EmuHawk\BizHawk.Client.EmuHawk.csproj">
|
|
||||||
<Project>{dd448b37-ba3f-4544-9754-5406e8094723}</Project>
|
|
||||||
<Name>BizHawk.Client.EmuHawk</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\BizHawk.Common\BizHawk.Common.csproj">
|
|
||||||
<Project>{866f8d13-0678-4ff9-80a4-a3993fd4d8a3}</Project>
|
|
||||||
<Name>BizHawk.Common</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\BizHawk.Emulation.Common\BizHawk.Emulation.Common.csproj">
|
|
||||||
<Project>{e1a23168-b571-411c-b360-2229e7225e0e}</Project>
|
|
||||||
<Name>BizHawk.Emulation.Common</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\BizHawk.Emulation.Cores\BizHawk.Emulation.Cores.csproj">
|
|
||||||
<Project>{197d4314-8a9f-49ba-977d-54acefaeb6ba}</Project>
|
|
||||||
<Name>BizHawk.Emulation.Cores</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\BizHawk.Emulation.DiscSystem\BizHawk.Emulation.DiscSystem.csproj">
|
|
||||||
<Project>{f51946ea-827f-4d82-b841-1f2f6d060312}</Project>
|
|
||||||
<Name>BizHawk.Emulation.DiscSystem</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\Bizware\BizHawk.Bizware.BizwareGL.GdiPlus\BizHawk.Bizware.BizwareGL.GdiPlus.csproj">
|
|
||||||
<Project>{337ca23e-65e7-44e1-9411-97ee08bb8116}</Project>
|
|
||||||
<Name>BizHawk.Bizware.BizwareGL.GdiPlus</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\Bizware\BizHawk.Bizware.BizwareGL.OpenTK\BizHawk.Bizware.BizwareGL.OpenTK.csproj">
|
|
||||||
<Project>{5160cfb1-5389-47c1-b7f6-8a0dc97641ee}</Project>
|
|
||||||
<Name>BizHawk.Bizware.BizwareGL.OpenTK</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\Bizware\BizHawk.Bizware.BizwareGL.SlimDX\BizHawk.Bizware.BizwareGL.SlimDX.csproj">
|
|
||||||
<Project>{e6b436b1-a3cd-4c9a-8f76-5d7154726884}</Project>
|
|
||||||
<Name>BizHawk.Bizware.BizwareGL.SlimDX</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\Bizware\BizHawk.Bizware.BizwareGL\BizHawk.Bizware.BizwareGL.csproj">
|
|
||||||
<Project>{9f84a0b2-861e-4ef4-b89b-5e2a3f38a465}</Project>
|
|
||||||
<Name>BizHawk.Bizware.BizwareGL</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="Resources\courier16px_0.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="images\GreenCheck.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="images\OpenFile.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="images\Pause.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="images\Play.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="images\ReadOnly.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="images\reboot.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="images\Recent.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="images\RecordHS.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="images\SaveAllHS.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="images\SaveAs.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="images\Scan.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="images\ExclamationRed.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="images\Stop.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="images\Blank.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="images\CutHS.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="images\GameController.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="images\HotKeys.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="images\Help.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="images\Save.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="images\restart.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
|
||||||
<Target Name="BeforeBuild">
|
|
||||||
</Target>
|
|
||||||
<Target Name="AfterBuild">
|
|
||||||
</Target>
|
|
||||||
-->
|
|
||||||
</Project>
|
|
|
@ -1,2 +0,0 @@
|
||||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
|
||||||
<s:String x:Key="/Default/CodeInspection/CSharpLanguageProject/LanguageLevel/@EntryValue">CSharp60</s:String></wpf:ResourceDictionary>
|
|
|
@ -1,724 +0,0 @@
|
||||||
//TODO
|
|
||||||
//we could flag textures as 'actually' render targets (keep a reference to the render target?) which could allow us to convert between them more quickly in some cases
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.IO;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Drawing;
|
|
||||||
|
|
||||||
using BizHawk.Emulation.Common;
|
|
||||||
using BizHawk.Client.Common;
|
|
||||||
using BizHawk.Client.EmuHawk;
|
|
||||||
using BizHawk.Client.EmuHawk.FilterManager;
|
|
||||||
using BizHawk.Bizware.BizwareGL;
|
|
||||||
|
|
||||||
using OpenTK;
|
|
||||||
using BizHawk.Bizware.BizwareGL.Drivers.SlimDX;
|
|
||||||
using BizHawk.Bizware.BizwareGL.Drivers.GdiPlus;
|
|
||||||
|
|
||||||
namespace BizHawk.Client.MultiHawk
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// A DisplayManager is destined forevermore to drive the PresentationPanel it gets initialized with.
|
|
||||||
/// Its job is to receive OSD and emulator outputs, and produce one single buffer (BitampBuffer? Texture2d?) for display by the PresentationPanel.
|
|
||||||
/// Details TBD
|
|
||||||
/// </summary>
|
|
||||||
public class DisplayManager : IDisposable
|
|
||||||
{
|
|
||||||
class DisplayManagerRenderTargetProvider : IRenderTargetProvider
|
|
||||||
{
|
|
||||||
public DisplayManagerRenderTargetProvider(Func<Size, RenderTarget> callback) { Callback = callback; }
|
|
||||||
Func<Size, RenderTarget> Callback;
|
|
||||||
RenderTarget IRenderTargetProvider.Get(Size size)
|
|
||||||
{
|
|
||||||
return Callback(size);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public DisplayManager(PresentationPanel presentationPanel, IGL gl, GLManager glManager)
|
|
||||||
{
|
|
||||||
GL = gl;
|
|
||||||
GLManager = glManager;
|
|
||||||
this.presentationPanel = presentationPanel;
|
|
||||||
GraphicsControl = this.presentationPanel.GraphicsControl;
|
|
||||||
CR_GraphicsControl = GLManager.GetContextForGraphicsControl(GraphicsControl);
|
|
||||||
|
|
||||||
//it's sort of important for these to be initialized to something nonzero
|
|
||||||
currEmuWidth = currEmuHeight = 1;
|
|
||||||
|
|
||||||
Renderer = GL.CreateRenderer();
|
|
||||||
|
|
||||||
VideoTextureFrugalizer = new TextureFrugalizer(GL);
|
|
||||||
|
|
||||||
ShaderChainFrugalizers = new RenderTargetFrugalizer[16]; //hacky hardcoded limit.. need some other way to manage these
|
|
||||||
for (int i = 0; i < 16; i++)
|
|
||||||
{
|
|
||||||
ShaderChainFrugalizers[i] = new RenderTargetFrugalizer(GL);
|
|
||||||
}
|
|
||||||
|
|
||||||
RefreshUserShader();
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool Disposed { get; private set; }
|
|
||||||
|
|
||||||
public void Dispose()
|
|
||||||
{
|
|
||||||
if (Disposed) return;
|
|
||||||
Disposed = true;
|
|
||||||
VideoTextureFrugalizer.Dispose();
|
|
||||||
foreach (var f in LuaSurfaceFrugalizers.Values)
|
|
||||||
f.Dispose();
|
|
||||||
foreach (var f in ShaderChainFrugalizers)
|
|
||||||
if (f != null)
|
|
||||||
f.Dispose();
|
|
||||||
Renderer.Dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
//rendering resources:
|
|
||||||
IGL GL;
|
|
||||||
GLManager GLManager;
|
|
||||||
IGuiRenderer Renderer;
|
|
||||||
|
|
||||||
//layer resources
|
|
||||||
PresentationPanel presentationPanel; //well, its the final layer's target, at least
|
|
||||||
GraphicsControl GraphicsControl; //well, its the final layer's target, at least
|
|
||||||
GLManager.ContextRef CR_GraphicsControl;
|
|
||||||
FilterProgram CurrentFilterProgram;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// these variables will track the dimensions of the last frame's (or the next frame? this is confusing) emulator native output size
|
|
||||||
/// THIS IS OLD JUNK. I should get rid of it, I think. complex results from the last filter ingestion should be saved instead.
|
|
||||||
/// </summary>
|
|
||||||
int currEmuWidth, currEmuHeight;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// additional pixels added at the unscaled level for the use of lua drawing. essentially increases the input video provider dimensions
|
|
||||||
/// </summary>
|
|
||||||
public System.Windows.Forms.Padding GameExtraPadding;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// additional pixels added at the native level for the use of lua drawing. essentially just gets tacked onto the final calculated window sizes.
|
|
||||||
/// </summary>
|
|
||||||
public System.Windows.Forms.Padding ClientExtraPadding;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// custom fonts that don't need to be installed on the user side
|
|
||||||
/// </summary>
|
|
||||||
public System.Drawing.Text.PrivateFontCollection CustomFonts = new System.Drawing.Text.PrivateFontCollection();
|
|
||||||
|
|
||||||
TextureFrugalizer VideoTextureFrugalizer;
|
|
||||||
Dictionary<string, TextureFrugalizer> LuaSurfaceFrugalizers = new Dictionary<string, TextureFrugalizer>();
|
|
||||||
RenderTargetFrugalizer[] ShaderChainFrugalizers;
|
|
||||||
EmuHawk.Filters.RetroShaderChain ShaderChain_user;
|
|
||||||
|
|
||||||
public void RefreshUserShader()
|
|
||||||
{
|
|
||||||
if (ShaderChain_user != null)
|
|
||||||
ShaderChain_user.Dispose();
|
|
||||||
if (File.Exists(Global.Config.DispUserFilterPath))
|
|
||||||
{
|
|
||||||
var fi = new FileInfo(Global.Config.DispUserFilterPath);
|
|
||||||
using (var stream = fi.OpenRead())
|
|
||||||
ShaderChain_user = new EmuHawk.Filters.RetroShaderChain(GL, new EmuHawk.Filters.RetroShaderPreset(stream), Path.GetDirectoryName(Global.Config.DispUserFilterPath));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
System.Windows.Forms.Padding CalculateCompleteContentPadding(bool user, bool source)
|
|
||||||
{
|
|
||||||
var padding = new System.Windows.Forms.Padding();
|
|
||||||
|
|
||||||
if(user)
|
|
||||||
padding += GameExtraPadding;
|
|
||||||
|
|
||||||
//an experimental feature
|
|
||||||
if(source)
|
|
||||||
if (Global.Emulator is BizHawk.Emulation.Cores.Sony.PSX.Octoshock)
|
|
||||||
{
|
|
||||||
var psx = Global.Emulator as BizHawk.Emulation.Cores.Sony.PSX.Octoshock;
|
|
||||||
var core_padding = psx.VideoProvider_Padding;
|
|
||||||
padding.Left += core_padding.Width / 2;
|
|
||||||
padding.Right += core_padding.Width - core_padding.Width / 2;
|
|
||||||
padding.Top += core_padding.Height / 2;
|
|
||||||
padding.Bottom += core_padding.Height - core_padding.Height / 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return padding;
|
|
||||||
}
|
|
||||||
|
|
||||||
FilterProgram BuildDefaultChain(Size chain_insize, Size chain_outsize, bool includeOSD)
|
|
||||||
{
|
|
||||||
//select user special FX shader chain
|
|
||||||
Dictionary<string, object> selectedChainProperties = new Dictionary<string, object>();
|
|
||||||
EmuHawk.Filters.RetroShaderChain selectedChain = null;
|
|
||||||
if (Global.Config.TargetDisplayFilter == 3 && ShaderChain_user != null && ShaderChain_user.Available)
|
|
||||||
selectedChain = ShaderChain_user;
|
|
||||||
|
|
||||||
EmuHawk.Filters.FinalPresentation fPresent = new EmuHawk.Filters.FinalPresentation(chain_outsize);
|
|
||||||
EmuHawk.Filters.SourceImage fInput = new EmuHawk.Filters.SourceImage(chain_insize);
|
|
||||||
EmuHawk.Filters.OSD fOSD = new EmuHawk.Filters.OSD();
|
|
||||||
fOSD.RenderCallback = () =>
|
|
||||||
{
|
|
||||||
if (!includeOSD)
|
|
||||||
return;
|
|
||||||
var size = fOSD.FindInput().SurfaceFormat.Size;
|
|
||||||
Renderer.Begin(size.Width, size.Height);
|
|
||||||
Renderer.SetBlendState(GL.BlendNormal);
|
|
||||||
Renderer.End();
|
|
||||||
};
|
|
||||||
|
|
||||||
var chain = new FilterProgram();
|
|
||||||
|
|
||||||
//add the first filter, encompassing output from the emulator core
|
|
||||||
chain.AddFilter(fInput, "input");
|
|
||||||
|
|
||||||
//if a non-zero padding is required, add a filter to allow for that
|
|
||||||
//note, we have two sources of padding right now.. one can come from the videoprovider and one from the user.
|
|
||||||
//we're combining these now and just using black, for sake of being lean, despite the discussion below:
|
|
||||||
//keep in mind, the videoprovider design in principle might call for another color.
|
|
||||||
//we havent really been using this very hard, but users will probably want black there (they could fill it to another color if needed tho)
|
|
||||||
var padding = CalculateCompleteContentPadding(true,true);
|
|
||||||
if (padding.Vertical != 0 || padding.Horizontal != 0)
|
|
||||||
{
|
|
||||||
//TODO - add another filter just for this, its cumbersome to use final presentation... I think. but maybe theres enough similarities to justify it.
|
|
||||||
Size size = chain_insize;
|
|
||||||
size.Width += padding.Horizontal;
|
|
||||||
size.Height += padding.Vertical;
|
|
||||||
EmuHawk.Filters.FinalPresentation fPadding = new EmuHawk.Filters.FinalPresentation(size);
|
|
||||||
chain.AddFilter(fPadding, "padding");
|
|
||||||
fPadding.GuiRenderer = Renderer;
|
|
||||||
fPadding.GL = GL;
|
|
||||||
fPadding.Config_PadOnly = true;
|
|
||||||
fPadding.Padding = padding;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Global.Config.DispPrescale != 1)
|
|
||||||
{
|
|
||||||
EmuHawk.Filters.PrescaleFilter fPrescale = new EmuHawk.Filters.PrescaleFilter() { Scale = Global.Config.DispPrescale };
|
|
||||||
chain.AddFilter(fPrescale, "user_prescale");
|
|
||||||
}
|
|
||||||
|
|
||||||
//AutoPrescale makes no sense for a None final filter
|
|
||||||
if (Global.Config.DispAutoPrescale && Global.Config.DispFinalFilter != (int)EmuHawk.Filters.FinalPresentation.eFilterOption.None)
|
|
||||||
{
|
|
||||||
var apf = new EmuHawk.Filters.AutoPrescaleFilter();
|
|
||||||
chain.AddFilter(apf, "auto_prescale");
|
|
||||||
}
|
|
||||||
|
|
||||||
//choose final filter
|
|
||||||
EmuHawk.Filters.FinalPresentation.eFilterOption finalFilter = EmuHawk.Filters.FinalPresentation.eFilterOption.None;
|
|
||||||
fPresent.FilterOption = finalFilter;
|
|
||||||
|
|
||||||
//add final presentation
|
|
||||||
chain.AddFilter(fPresent, "presentation");
|
|
||||||
|
|
||||||
return chain;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// This will receive an emulated output frame from an IVideoProvider and run it through the complete frame processing pipeline
|
|
||||||
/// Then it will stuff it into the bound PresentationPanel.
|
|
||||||
/// ---
|
|
||||||
/// If the int[] is size=1, then it contains an openGL texture ID (and the size should be as specified from videoProvider)
|
|
||||||
/// Don't worry about the case where the frontend isnt using opengl; DisplayManager deals with it
|
|
||||||
/// </summary>
|
|
||||||
public void UpdateSource(IVideoProvider videoProvider)
|
|
||||||
{
|
|
||||||
bool displayNothing = Global.Config.DispSpeedupFeatures == 0;
|
|
||||||
var job = new JobInfo
|
|
||||||
{
|
|
||||||
videoProvider = videoProvider,
|
|
||||||
simulate = displayNothing,
|
|
||||||
chain_outsize = GraphicsControl.Size,
|
|
||||||
includeOSD = true,
|
|
||||||
};
|
|
||||||
UpdateSourceInternal(job);
|
|
||||||
}
|
|
||||||
|
|
||||||
public BitmapBuffer RenderVideoProvider(IVideoProvider videoProvider)
|
|
||||||
{
|
|
||||||
//TODO - we might need to gather more Global.Config.DispXXX properties here, so they can be overridden
|
|
||||||
var targetSize = new Size(videoProvider.BufferWidth, videoProvider.BufferHeight);
|
|
||||||
var padding = CalculateCompleteContentPadding(true,true);
|
|
||||||
targetSize.Width += padding.Horizontal;
|
|
||||||
targetSize.Height += padding.Vertical;
|
|
||||||
|
|
||||||
var job = new JobInfo
|
|
||||||
{
|
|
||||||
videoProvider = videoProvider,
|
|
||||||
simulate = false,
|
|
||||||
chain_outsize = targetSize,
|
|
||||||
offscreen = true,
|
|
||||||
includeOSD = false
|
|
||||||
};
|
|
||||||
UpdateSourceInternal(job);
|
|
||||||
return job.offscreenBB;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Does the entire display process to an offscreen buffer, suitable for a 'client' screenshot.
|
|
||||||
/// </summary>
|
|
||||||
public BitmapBuffer RenderOffscreen(IVideoProvider videoProvider, bool includeOSD)
|
|
||||||
{
|
|
||||||
var job = new JobInfo
|
|
||||||
{
|
|
||||||
videoProvider = videoProvider,
|
|
||||||
simulate = false,
|
|
||||||
chain_outsize = GraphicsControl.Size,
|
|
||||||
offscreen = true,
|
|
||||||
includeOSD = includeOSD
|
|
||||||
};
|
|
||||||
UpdateSourceInternal(job);
|
|
||||||
return job.offscreenBB;
|
|
||||||
}
|
|
||||||
|
|
||||||
class FakeVideoProvider : IVideoProvider
|
|
||||||
{
|
|
||||||
public int[] GetVideoBuffer() { return new int[] {}; }
|
|
||||||
|
|
||||||
public int VirtualWidth { get; set; }
|
|
||||||
public int VirtualHeight { get; set; }
|
|
||||||
|
|
||||||
public int BufferWidth { get; set; }
|
|
||||||
public int BufferHeight { get; set; }
|
|
||||||
public int BackgroundColor { get; set; }
|
|
||||||
|
|
||||||
public int VsyncNumerator
|
|
||||||
{
|
|
||||||
get { throw new InvalidOperationException(); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public int VsyncDenominator
|
|
||||||
{
|
|
||||||
get { throw new InvalidOperationException(); }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void FixRatio(float x, float y, int inw, int inh, out int outw, out int outh)
|
|
||||||
{
|
|
||||||
float ratio = x / y;
|
|
||||||
if (ratio <= 1)
|
|
||||||
{
|
|
||||||
//taller. weird. expand height.
|
|
||||||
outw = inw;
|
|
||||||
outh = (int)((float)inw / ratio);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//wider. normal. expand width.
|
|
||||||
outw = (int)((float)inh * ratio);
|
|
||||||
outh = inh;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Attempts to calculate a good client size with the given zoom factor, considering the user's DisplayManager preferences
|
|
||||||
/// TODO - this needs to be redone with a concept different from zoom factor.
|
|
||||||
/// basically, each increment of a 'zoomlike' factor should definitely increase the viewable area somehow, even if it isnt strictly by an entire zoom level.
|
|
||||||
/// </summary>
|
|
||||||
public Size CalculateClientSize(IVideoProvider videoProvider, int zoom)
|
|
||||||
{
|
|
||||||
bool ar_active = Global.Config.DispFixAspectRatio;
|
|
||||||
bool ar_system = Global.Config.DispManagerAR == Config.EDispManagerAR.System;
|
|
||||||
bool ar_custom = Global.Config.DispManagerAR == Config.EDispManagerAR.Custom;
|
|
||||||
bool ar_customRatio = Global.Config.DispManagerAR == Config.EDispManagerAR.CustomRatio;
|
|
||||||
bool ar_correct = ar_system || ar_custom || ar_customRatio;
|
|
||||||
bool ar_unity = !ar_correct;
|
|
||||||
bool ar_integer = Global.Config.DispFixScaleInteger;
|
|
||||||
|
|
||||||
int bufferWidth = videoProvider.BufferWidth;
|
|
||||||
int bufferHeight = videoProvider.BufferHeight;
|
|
||||||
int virtualWidth = videoProvider.VirtualWidth;
|
|
||||||
int virtualHeight = videoProvider.VirtualHeight;
|
|
||||||
|
|
||||||
if (ar_custom)
|
|
||||||
{
|
|
||||||
virtualWidth = Global.Config.DispCustomUserARWidth;
|
|
||||||
virtualHeight = Global.Config.DispCustomUserARHeight;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ar_customRatio)
|
|
||||||
{
|
|
||||||
FixRatio(Global.Config.DispCustomUserARX, Global.Config.DispCustomUserARY, videoProvider.BufferWidth, videoProvider.BufferHeight, out virtualWidth, out virtualHeight);
|
|
||||||
}
|
|
||||||
|
|
||||||
var padding = CalculateCompleteContentPadding(true, false);
|
|
||||||
virtualWidth += padding.Horizontal;
|
|
||||||
virtualHeight += padding.Vertical;
|
|
||||||
|
|
||||||
padding = CalculateCompleteContentPadding(true, true);
|
|
||||||
bufferWidth += padding.Horizontal;
|
|
||||||
bufferHeight += padding.Vertical;
|
|
||||||
|
|
||||||
//Console.WriteLine("DISPZOOM " + zoom); //test
|
|
||||||
|
|
||||||
//old stuff
|
|
||||||
var fvp = new FakeVideoProvider();
|
|
||||||
fvp.BufferWidth = bufferWidth;
|
|
||||||
fvp.BufferHeight = bufferHeight;
|
|
||||||
fvp.VirtualWidth = virtualWidth;
|
|
||||||
fvp.VirtualHeight = virtualHeight;
|
|
||||||
|
|
||||||
Size chain_outsize = new Size(fvp.BufferWidth * zoom, fvp.BufferHeight * zoom);
|
|
||||||
|
|
||||||
if (ar_active)
|
|
||||||
{
|
|
||||||
if (ar_correct)
|
|
||||||
{
|
|
||||||
if (ar_integer)
|
|
||||||
{
|
|
||||||
//ALERT COPYPASTE LAUNDROMAT
|
|
||||||
Vector2 VS = new Vector2(virtualWidth, virtualHeight);
|
|
||||||
Vector2 BS = new Vector2(bufferWidth, bufferHeight);
|
|
||||||
Vector2 AR = Vector2.Divide(VS, BS);
|
|
||||||
float target_par = (AR.X / AR.Y);
|
|
||||||
|
|
||||||
//this would malfunction for AR <= 0.5 or AR >= 2.0
|
|
||||||
//EDIT - in fact, we have AR like that coming from PSX, sometimes, so maybe we should solve this better
|
|
||||||
Vector2 PS = new Vector2(1, 1);
|
|
||||||
|
|
||||||
//here's how we define zooming, in this case:
|
|
||||||
//make sure each step is an increment of zoom for at least one of the dimensions (or maybe both of them)
|
|
||||||
//look for the increment which helps the AR the best
|
|
||||||
//TODO - this cant possibly support scale factors like 1.5x
|
|
||||||
//TODO - also, this might be messing up zooms and stuff, we might need to run this on the output size of the filter chain
|
|
||||||
for (int i = 1; i < zoom;i++)
|
|
||||||
{
|
|
||||||
//would not be good to run this per frame, but it seems to only run when the resolution changes, etc.
|
|
||||||
Vector2[] trials = new[] {
|
|
||||||
PS + new Vector2(1, 0),
|
|
||||||
PS + new Vector2(0, 1),
|
|
||||||
PS + new Vector2(1, 1)
|
|
||||||
};
|
|
||||||
int bestIndex = -1;
|
|
||||||
float bestValue = 1000.0f;
|
|
||||||
for (int t = 0; t < trials.Length; t++)
|
|
||||||
{
|
|
||||||
//I.
|
|
||||||
float test_ar = trials[t].X / trials[t].Y;
|
|
||||||
|
|
||||||
//II.
|
|
||||||
//Vector2 calc = Vector2.Multiply(trials[t], VS);
|
|
||||||
//float test_ar = calc.X / calc.Y;
|
|
||||||
|
|
||||||
//not clear which approach is superior
|
|
||||||
float deviation_linear = Math.Abs(test_ar - target_par);
|
|
||||||
float deviation_geom = test_ar / target_par;
|
|
||||||
if (deviation_geom < 1) deviation_geom = 1.0f / deviation_geom;
|
|
||||||
|
|
||||||
float value = deviation_linear;
|
|
||||||
if (value < bestValue)
|
|
||||||
{
|
|
||||||
bestIndex = t;
|
|
||||||
bestValue = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//is it possible to get here without selecting one? doubtful.
|
|
||||||
//EDIT: YES IT IS. it happened with an 0,0 buffer size. of course, that was a mistake, but we shouldnt crash
|
|
||||||
if(bestIndex != -1) //so, what now? well, this will result in 0,0 getting picked, so thats probably all we can do
|
|
||||||
PS = trials[bestIndex];
|
|
||||||
}
|
|
||||||
|
|
||||||
chain_outsize = new Size((int)(bufferWidth * PS.X), (int)(bufferHeight * PS.Y));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//obey the AR, but allow free scaling: just zoom the virtual size
|
|
||||||
chain_outsize = new Size(virtualWidth * zoom, virtualHeight * zoom);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//ar_unity:
|
|
||||||
//just choose to zoom the buffer (make no effort to incorporate AR)
|
|
||||||
chain_outsize = new Size(bufferWidth * zoom, bufferHeight * zoom);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//!ar_active:
|
|
||||||
//just choose to zoom the buffer (make no effort to incorporate AR)
|
|
||||||
chain_outsize = new Size(bufferWidth * zoom, bufferHeight * zoom);
|
|
||||||
}
|
|
||||||
|
|
||||||
chain_outsize.Width += ClientExtraPadding.Horizontal;
|
|
||||||
chain_outsize.Height += ClientExtraPadding.Vertical;
|
|
||||||
|
|
||||||
var job = new JobInfo
|
|
||||||
{
|
|
||||||
videoProvider = fvp,
|
|
||||||
simulate = true,
|
|
||||||
chain_outsize = chain_outsize,
|
|
||||||
};
|
|
||||||
var filterProgram = UpdateSourceInternal(job);
|
|
||||||
|
|
||||||
var size = filterProgram.Filters[filterProgram.Filters.Count - 1].FindOutput().SurfaceFormat.Size;
|
|
||||||
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
|
|
||||||
class JobInfo
|
|
||||||
{
|
|
||||||
public IVideoProvider videoProvider;
|
|
||||||
public bool simulate;
|
|
||||||
public Size chain_outsize;
|
|
||||||
public bool offscreen;
|
|
||||||
public BitmapBuffer offscreenBB;
|
|
||||||
public bool includeOSD;
|
|
||||||
}
|
|
||||||
|
|
||||||
FilterProgram UpdateSourceInternal(JobInfo job)
|
|
||||||
{
|
|
||||||
if (job.chain_outsize.Width == 0 || job.chain_outsize.Height == 0)
|
|
||||||
{
|
|
||||||
//this has to be a NOP, because lots of stuff will malfunction on a 0-sized viewport
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
//no drawing actually happens. it's important not to begin drawing on a control
|
|
||||||
if (!job.simulate && !job.offscreen)
|
|
||||||
{
|
|
||||||
GLManager.Activate(CR_GraphicsControl);
|
|
||||||
}
|
|
||||||
|
|
||||||
IVideoProvider videoProvider = job.videoProvider;
|
|
||||||
bool simulate = job.simulate;
|
|
||||||
Size chain_outsize = job.chain_outsize;
|
|
||||||
|
|
||||||
//simulate = true;
|
|
||||||
|
|
||||||
int vw = videoProvider.BufferWidth;
|
|
||||||
int vh = videoProvider.BufferHeight;
|
|
||||||
|
|
||||||
if (Global.Config.DispFixAspectRatio)
|
|
||||||
{
|
|
||||||
if (Global.Config.DispManagerAR == Config.EDispManagerAR.System)
|
|
||||||
{
|
|
||||||
vw = videoProvider.VirtualWidth;
|
|
||||||
vh = videoProvider.VirtualHeight;
|
|
||||||
}
|
|
||||||
if (Global.Config.DispManagerAR == Config.EDispManagerAR.Custom)
|
|
||||||
{
|
|
||||||
vw = Global.Config.DispCustomUserARWidth;
|
|
||||||
vh = Global.Config.DispCustomUserARHeight;
|
|
||||||
}
|
|
||||||
if (Global.Config.DispManagerAR == Config.EDispManagerAR.CustomRatio)
|
|
||||||
{
|
|
||||||
FixRatio(Global.Config.DispCustomUserARX, Global.Config.DispCustomUserARY, videoProvider.BufferWidth, videoProvider.BufferHeight, out vw, out vh);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var padding = CalculateCompleteContentPadding(true,false);
|
|
||||||
vw += padding.Horizontal;
|
|
||||||
vh += padding.Vertical;
|
|
||||||
|
|
||||||
int[] videoBuffer = videoProvider.GetVideoBuffer();
|
|
||||||
|
|
||||||
int bufferWidth = videoProvider.BufferWidth;
|
|
||||||
int bufferHeight = videoProvider.BufferHeight;
|
|
||||||
bool isGlTextureId = videoBuffer.Length == 1;
|
|
||||||
|
|
||||||
BitmapBuffer bb = null;
|
|
||||||
Texture2d videoTexture = null;
|
|
||||||
if (!simulate)
|
|
||||||
{
|
|
||||||
if (isGlTextureId)
|
|
||||||
{
|
|
||||||
//FYI: this is a million years from happening on n64, since it's all geriatric non-FBO code
|
|
||||||
//is it workable for saturn?
|
|
||||||
videoTexture = GL.WrapGLTexture2d(new IntPtr(videoBuffer[0]), bufferWidth, bufferHeight);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//wrap the videoprovider data in a BitmapBuffer (no point to refactoring that many IVideoProviders)
|
|
||||||
bb = new BitmapBuffer(bufferWidth, bufferHeight, videoBuffer);
|
|
||||||
bb.DiscardAlpha();
|
|
||||||
|
|
||||||
//now, acquire the data sent from the videoProvider into a texture
|
|
||||||
videoTexture = VideoTextureFrugalizer.Get(bb);
|
|
||||||
|
|
||||||
//lets not use this. lets define BizwareGL to make clamp by default (TBD: check opengl)
|
|
||||||
//GL.SetTextureWrapMode(videoTexture, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//record the size of what we received, since lua and stuff is gonna want to draw onto it
|
|
||||||
currEmuWidth = bufferWidth;
|
|
||||||
currEmuHeight = bufferHeight;
|
|
||||||
|
|
||||||
//build the default filter chain and set it up with services filters will need
|
|
||||||
Size chain_insize = new Size(bufferWidth, bufferHeight);
|
|
||||||
|
|
||||||
var filterProgram = BuildDefaultChain(chain_insize, chain_outsize, job.includeOSD);
|
|
||||||
filterProgram.GuiRenderer = Renderer;
|
|
||||||
filterProgram.GL = GL;
|
|
||||||
|
|
||||||
//setup the source image filter
|
|
||||||
EmuHawk.Filters.SourceImage fInput = filterProgram["input"] as EmuHawk.Filters.SourceImage;
|
|
||||||
fInput.Texture = videoTexture;
|
|
||||||
|
|
||||||
//setup the final presentation filter
|
|
||||||
EmuHawk.Filters.FinalPresentation fPresent = filterProgram["presentation"] as EmuHawk.Filters.FinalPresentation;
|
|
||||||
fPresent.VirtualTextureSize = new Size(vw, vh);
|
|
||||||
fPresent.TextureSize = new Size(bufferWidth, bufferHeight);
|
|
||||||
fPresent.BackgroundColor = videoProvider.BackgroundColor;
|
|
||||||
fPresent.GuiRenderer = Renderer;
|
|
||||||
fPresent.Flip = isGlTextureId;
|
|
||||||
fPresent.Config_FixAspectRatio = Global.Config.DispFixAspectRatio;
|
|
||||||
fPresent.Config_FixScaleInteger = Global.Config.DispFixScaleInteger;
|
|
||||||
fPresent.Padding = ClientExtraPadding;
|
|
||||||
fPresent.AutoPrescale = Global.Config.DispAutoPrescale;
|
|
||||||
|
|
||||||
fPresent.GL = GL;
|
|
||||||
|
|
||||||
filterProgram.Compile("default", chain_insize, chain_outsize, !job.offscreen);
|
|
||||||
|
|
||||||
if (simulate)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CurrentFilterProgram = filterProgram;
|
|
||||||
UpdateSourceDrawingWork(job);
|
|
||||||
}
|
|
||||||
|
|
||||||
//cleanup:
|
|
||||||
if (bb != null) bb.Dispose();
|
|
||||||
|
|
||||||
return filterProgram;
|
|
||||||
}
|
|
||||||
|
|
||||||
void UpdateSourceDrawingWork(JobInfo job)
|
|
||||||
{
|
|
||||||
bool vsync = false;
|
|
||||||
bool alternateVsync = false;
|
|
||||||
//only used by alternate vsync
|
|
||||||
IGL_SlimDX9 dx9 = null;
|
|
||||||
|
|
||||||
if (!job.offscreen)
|
|
||||||
{
|
|
||||||
//apply the vsync setting (should probably try to avoid repeating this)
|
|
||||||
vsync = Global.Config.VSyncThrottle || Global.Config.VSync;
|
|
||||||
|
|
||||||
//ok, now this is a bit undesireable.
|
|
||||||
//maybe the user wants vsync, but not vsync throttle.
|
|
||||||
//this makes sense... but we dont have the infrastructure to support it now (we'd have to enable triple buffering or something like that)
|
|
||||||
//so what we're gonna do is disable vsync no matter what if throttling is off, and maybe nobody will notice.
|
|
||||||
//update 26-mar-2016: this upsets me. When fastforwarding and skipping frames, vsync should still work. But I'm not changing it yet
|
|
||||||
if (Global.DisableSecondaryThrottling)
|
|
||||||
vsync = false;
|
|
||||||
|
|
||||||
//for now, it's assumed that the presentation panel is the main window, but that may not always be true
|
|
||||||
if (vsync && Global.Config.DispAlternateVsync && Global.Config.VSyncThrottle)
|
|
||||||
{
|
|
||||||
dx9 = GL as IGL_SlimDX9;
|
|
||||||
if (dx9 != null)
|
|
||||||
{
|
|
||||||
alternateVsync = true;
|
|
||||||
//unset normal vsync if we've chosen the alternate vsync
|
|
||||||
vsync = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//TODO - whats so hard about triple buffering anyway? just enable it always, and change api to SetVsync(enable,throttle)
|
|
||||||
//maybe even SetVsync(enable,throttlemethod) or just SetVsync(enable,throttle,advanced)
|
|
||||||
|
|
||||||
if (LastVsyncSetting != vsync || LastVsyncSettingGraphicsControl != presentationPanel.GraphicsControl)
|
|
||||||
{
|
|
||||||
if (LastVsyncSetting == null && vsync)
|
|
||||||
{
|
|
||||||
// Workaround for vsync not taking effect at startup (Intel graphics related?)
|
|
||||||
presentationPanel.GraphicsControl.SetVsync(false);
|
|
||||||
}
|
|
||||||
presentationPanel.GraphicsControl.SetVsync(vsync);
|
|
||||||
LastVsyncSettingGraphicsControl = presentationPanel.GraphicsControl;
|
|
||||||
LastVsyncSetting = vsync;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//begin rendering on this context
|
|
||||||
//should this have been done earlier?
|
|
||||||
//do i need to check this on an intel video card to see if running excessively is a problem? (it used to be in the FinalTarget command below, shouldnt be a problem)
|
|
||||||
//GraphicsControl.Begin(); //CRITICAL POINT for yabause+GL
|
|
||||||
|
|
||||||
//TODO - auto-create and age these (and dispose when old)
|
|
||||||
int rtCounter = 0;
|
|
||||||
|
|
||||||
CurrentFilterProgram.RenderTargetProvider = new DisplayManagerRenderTargetProvider((size) => ShaderChainFrugalizers[rtCounter++].Get(size));
|
|
||||||
|
|
||||||
GL.BeginScene();
|
|
||||||
|
|
||||||
//run filter chain
|
|
||||||
Texture2d texCurr = null;
|
|
||||||
RenderTarget rtCurr = null;
|
|
||||||
bool inFinalTarget = false;
|
|
||||||
foreach (var step in CurrentFilterProgram.Program)
|
|
||||||
{
|
|
||||||
switch (step.Type)
|
|
||||||
{
|
|
||||||
case FilterProgram.ProgramStepType.Run:
|
|
||||||
{
|
|
||||||
int fi = (int)step.Args;
|
|
||||||
var f = CurrentFilterProgram.Filters[fi];
|
|
||||||
f.SetInput(texCurr);
|
|
||||||
f.Run();
|
|
||||||
var orec = f.FindOutput();
|
|
||||||
if (orec != null)
|
|
||||||
{
|
|
||||||
if (orec.SurfaceDisposition == SurfaceDisposition.Texture)
|
|
||||||
{
|
|
||||||
texCurr = f.GetOutput();
|
|
||||||
rtCurr = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case FilterProgram.ProgramStepType.NewTarget:
|
|
||||||
{
|
|
||||||
var size = (Size)step.Args;
|
|
||||||
rtCurr = ShaderChainFrugalizers[rtCounter++].Get(size);
|
|
||||||
rtCurr.Bind();
|
|
||||||
CurrentFilterProgram.CurrRenderTarget = rtCurr;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case FilterProgram.ProgramStepType.FinalTarget:
|
|
||||||
{
|
|
||||||
var size = (Size)step.Args;
|
|
||||||
inFinalTarget = true;
|
|
||||||
rtCurr = null;
|
|
||||||
CurrentFilterProgram.CurrRenderTarget = null;
|
|
||||||
GL.BindRenderTarget(null);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
GL.EndScene();
|
|
||||||
|
|
||||||
if (job.offscreen)
|
|
||||||
{
|
|
||||||
job.offscreenBB = rtCurr.Texture2d.Resolve();
|
|
||||||
job.offscreenBB.DiscardAlpha();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Assert(inFinalTarget);
|
|
||||||
|
|
||||||
//wait for vsync to begin
|
|
||||||
if (alternateVsync) dx9.AlternateVsyncPass(0);
|
|
||||||
|
|
||||||
//present and conclude drawing
|
|
||||||
presentationPanel.GraphicsControl.SwapBuffers();
|
|
||||||
|
|
||||||
//wait for vsync to end
|
|
||||||
if (alternateVsync) dx9.AlternateVsyncPass(1);
|
|
||||||
|
|
||||||
//nope. dont do this. workaround for slow context switching on intel GPUs. just switch to another context when necessary before doing anything
|
|
||||||
//presentationPanel.GraphicsControl.End();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool? LastVsyncSetting;
|
|
||||||
GraphicsControl LastVsyncSettingGraphicsControl;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,48 +0,0 @@
|
||||||
namespace BizHawk.Client.MultiHawk
|
|
||||||
{
|
|
||||||
partial class EmulatorWindow
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Required designer variable.
|
|
||||||
/// </summary>
|
|
||||||
private System.ComponentModel.IContainer components = null;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Clean up any resources being used.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
|
||||||
protected override void Dispose(bool disposing)
|
|
||||||
{
|
|
||||||
if (disposing && (components != null))
|
|
||||||
{
|
|
||||||
components.Dispose();
|
|
||||||
}
|
|
||||||
base.Dispose(disposing);
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Windows Form Designer generated code
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Required method for Designer support - do not modify
|
|
||||||
/// the contents of this method with the code editor.
|
|
||||||
/// </summary>
|
|
||||||
private void InitializeComponent()
|
|
||||||
{
|
|
||||||
this.SuspendLayout();
|
|
||||||
//
|
|
||||||
// EmulatorWindow
|
|
||||||
//
|
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
|
||||||
this.ClientSize = new System.Drawing.Size(284, 262);
|
|
||||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
|
||||||
this.Name = "EmulatorWindow";
|
|
||||||
this.ShowIcon = false;
|
|
||||||
this.Load += new System.EventHandler(this.EmulatorWindow_Load);
|
|
||||||
this.ResumeLayout(false);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,411 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Data;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
|
|
||||||
using BizHawk.Common;
|
|
||||||
using BizHawk.Common.BufferExtensions;
|
|
||||||
using BizHawk.Client.EmuHawk;
|
|
||||||
using BizHawk.Bizware.BizwareGL;
|
|
||||||
using BizHawk.Client.Common;
|
|
||||||
using BizHawk.Emulation.Common;
|
|
||||||
using BizHawk.Emulation.Common.IEmulatorExtensions;
|
|
||||||
using System.IO;
|
|
||||||
|
|
||||||
|
|
||||||
namespace BizHawk.Client.MultiHawk
|
|
||||||
{
|
|
||||||
// TODO: we can safely assume videoprovider cores are a requirement of multihawk,
|
|
||||||
// but fail sooner and with a clear message instead of making misc calls to AsVideoProvider that will fail
|
|
||||||
public partial class EmulatorWindow : Form
|
|
||||||
{
|
|
||||||
public EmulatorWindow(Mainform parent)
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
Closing += (o, e) =>
|
|
||||||
{
|
|
||||||
ShutDown();
|
|
||||||
};
|
|
||||||
|
|
||||||
MainForm = parent;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void EmulatorWindow_Load(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (Game != null)
|
|
||||||
{
|
|
||||||
Text = Game.Name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Mainform MainForm { get; private set; }
|
|
||||||
public IEmulator Emulator { get; set; }
|
|
||||||
public CoreComm CoreComm { get; set; }
|
|
||||||
public GameInfo Game { get; set; }
|
|
||||||
public string CurrentRomPath { get; set; }
|
|
||||||
|
|
||||||
public IGL GL { get; set; }
|
|
||||||
public GLManager.ContextRef CR_GL { get; set; }
|
|
||||||
public GLManager GLManager { get; set; }
|
|
||||||
|
|
||||||
public PresentationPanel PresentationPanel { get; set; }
|
|
||||||
|
|
||||||
//public Sound Sound; // TODO
|
|
||||||
public DisplayManager DisplayManager;
|
|
||||||
|
|
||||||
|
|
||||||
public void Init()
|
|
||||||
{
|
|
||||||
PresentationPanel = new PresentationPanel(this, GL);
|
|
||||||
CR_GL = GLManager.GetContextForIGL(GL);
|
|
||||||
DisplayManager = new DisplayManager(PresentationPanel, GL ,GLManager);
|
|
||||||
|
|
||||||
Controls.Add(PresentationPanel);
|
|
||||||
Controls.SetChildIndex(PresentationPanel, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ShutDown()
|
|
||||||
{
|
|
||||||
SaveRam();
|
|
||||||
MainForm.EmulatorWindowClosed(this);
|
|
||||||
Emulator.Dispose();
|
|
||||||
GL.Dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void LoadQuickSave(string quickSlotName)
|
|
||||||
{
|
|
||||||
if (!Emulator.HasSavestates())
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var path = PathManager.SaveStatePrefix(Game) + "." + quickSlotName + ".State";
|
|
||||||
|
|
||||||
if (LoadStateFile(path, quickSlotName))
|
|
||||||
{
|
|
||||||
// SetMainformMovieInfo(); // TODO
|
|
||||||
MainForm.AddMessage("Loaded state: " + quickSlotName);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MainForm.AddMessage("Loadstate error!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool LoadStateFile(string path, string name)
|
|
||||||
{
|
|
||||||
var core = Emulator.AsStatable();
|
|
||||||
|
|
||||||
// try to detect binary first
|
|
||||||
var bl = BinaryStateLoader.LoadAndDetect(path);
|
|
||||||
if (bl != null)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var succeed = false;
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
if (IAmMaster)
|
|
||||||
{
|
|
||||||
if (Global.MovieSession.Movie.IsActive)
|
|
||||||
{
|
|
||||||
bl.GetLump(BinaryStateLump.Input, true, tr => succeed = Global.MovieSession.HandleMovieLoadState_HackyStep1(tr));
|
|
||||||
if (!succeed)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bl.GetLump(BinaryStateLump.Input, true, tr => succeed = Global.MovieSession.HandleMovieLoadState_HackyStep2(tr));
|
|
||||||
if (!succeed)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
using (new SimpleTime("Load Core"))
|
|
||||||
bl.GetCoreState(br => core.LoadStateBinary(br), tr => core.LoadStateText(tr));
|
|
||||||
|
|
||||||
bl.GetLump(BinaryStateLump.Framebuffer, false, PopulateFramebuffer);
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
bl.Dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else // text mode
|
|
||||||
{
|
|
||||||
if (Global.MovieSession.HandleMovieLoadState(path))
|
|
||||||
{
|
|
||||||
using (var reader = new StreamReader(path))
|
|
||||||
{
|
|
||||||
core.LoadStateText(reader);
|
|
||||||
|
|
||||||
while (true)
|
|
||||||
{
|
|
||||||
var str = reader.ReadLine();
|
|
||||||
if (str == null)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (str.Trim() == "")
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
var args = str.Split(' ');
|
|
||||||
if (args[0] == "Framebuffer")
|
|
||||||
{
|
|
||||||
Emulator.AsVideoProvider().GetVideoBuffer().ReadFromHex(args[1]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void PopulateFramebuffer(BinaryReader br)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
using (new SimpleTime("Load Framebuffer"))
|
|
||||||
QuickBmpFile.Load(Emulator.AsVideoProvider(), br.BaseStream);
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
var buff = Emulator.AsVideoProvider().GetVideoBuffer();
|
|
||||||
try
|
|
||||||
{
|
|
||||||
for (int i = 0; i < buff.Length; i++)
|
|
||||||
{
|
|
||||||
int j = br.ReadInt32();
|
|
||||||
buff[i] = j;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (EndOfStreamException) { }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SaveQuickSave(string quickSlotName)
|
|
||||||
{
|
|
||||||
if (!Emulator.HasSavestates())
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var path = PathManager.SaveStatePrefix(Game) + "." + quickSlotName + ".State";
|
|
||||||
|
|
||||||
var file = new FileInfo(path);
|
|
||||||
if (file.Directory != null && file.Directory.Exists == false)
|
|
||||||
{
|
|
||||||
file.Directory.Create();
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
// Make backup first
|
|
||||||
//if (Global.Config.BackupSavestates && file.Exists)
|
|
||||||
//{
|
|
||||||
// var backup = path + ".bak";
|
|
||||||
// var backupFile = new FileInfo(backup);
|
|
||||||
// if (backupFile.Exists)
|
|
||||||
// {
|
|
||||||
// backupFile.Delete();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// File.Move(path, backup);
|
|
||||||
//}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
SaveStateFile(path, quickSlotName);
|
|
||||||
|
|
||||||
MainForm.AddMessage("Saved state: " + quickSlotName);
|
|
||||||
}
|
|
||||||
catch (IOException)
|
|
||||||
{
|
|
||||||
MainForm.AddMessage("Unable to save state " + path);
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SaveStateFile(string filename, string name)
|
|
||||||
{
|
|
||||||
var core = Emulator.AsStatable();
|
|
||||||
|
|
||||||
using (var bs = new BinaryStateSaver(filename))
|
|
||||||
{
|
|
||||||
if (Global.Config.SaveStateType == Config.SaveStateTypeE.Text ||
|
|
||||||
(Global.Config.SaveStateType == Config.SaveStateTypeE.Default && !core.BinarySaveStatesPreferred))
|
|
||||||
{
|
|
||||||
// text savestate format
|
|
||||||
using (new SimpleTime("Save Core"))
|
|
||||||
bs.PutLump(BinaryStateLump.CorestateText, (tw) => core.SaveStateText(tw));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// binary core lump format
|
|
||||||
using (new SimpleTime("Save Core"))
|
|
||||||
bs.PutLump(BinaryStateLump.Corestate, bw => core.SaveStateBinary(bw));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (true) //TODO: Global.Config.SaveScreenshotWithStates)
|
|
||||||
{
|
|
||||||
var vp = Emulator.AsVideoProvider();
|
|
||||||
var buff = vp.GetVideoBuffer();
|
|
||||||
|
|
||||||
int out_w = vp.BufferWidth;
|
|
||||||
int out_h = vp.BufferHeight;
|
|
||||||
|
|
||||||
// if buffer is too big, scale down screenshot
|
|
||||||
if (true /* !Global.Config.NoLowResLargeScreenshotWithStates*/ && buff.Length >= Global.Config.BigScreenshotSize)
|
|
||||||
{
|
|
||||||
out_w /= 2;
|
|
||||||
out_h /= 2;
|
|
||||||
}
|
|
||||||
using (new SimpleTime("Save Framebuffer"))
|
|
||||||
bs.PutLump(BinaryStateLump.Framebuffer, (s) => QuickBmpFile.Save(Emulator.AsVideoProvider(), s, out_w, out_h));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IAmMaster)
|
|
||||||
{
|
|
||||||
if (Global.MovieSession.Movie.IsActive)
|
|
||||||
{
|
|
||||||
bs.PutLump(BinaryStateLump.Input,
|
|
||||||
delegate(TextWriter tw)
|
|
||||||
{
|
|
||||||
// this never should have been a core's responsibility
|
|
||||||
tw.WriteLine("Frame {0}", Emulator.Frame);
|
|
||||||
Global.MovieSession.HandleMovieSaveState(tw);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IAmMaster
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return MainForm.EmulatorWindows.First() == this;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void FrameBufferResized()
|
|
||||||
{
|
|
||||||
// run this entire thing exactly twice, since the first resize may adjust the menu stacking
|
|
||||||
for (int i = 0; i < 2; i++)
|
|
||||||
{
|
|
||||||
var video = Emulator.AsVideoProvider();
|
|
||||||
int zoom = Global.Config.TargetZoomFactors[Global.Emulator.SystemId];
|
|
||||||
var area = Screen.FromControl(this).WorkingArea;
|
|
||||||
|
|
||||||
int borderWidth = Size.Width - PresentationPanel.Control.Size.Width;
|
|
||||||
int borderHeight = Size.Height - PresentationPanel.Control.Size.Height;
|
|
||||||
|
|
||||||
// start at target zoom and work way down until we find acceptable zoom
|
|
||||||
Size lastComputedSize = new Size(1, 1);
|
|
||||||
for (; zoom >= 1; zoom--)
|
|
||||||
{
|
|
||||||
lastComputedSize = DisplayManager.CalculateClientSize(video, zoom);
|
|
||||||
if ((((lastComputedSize.Width) + borderWidth) < area.Width)
|
|
||||||
&& (((lastComputedSize.Height) + borderHeight) < area.Height))
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Console.WriteLine("Selecting display size " + lastComputedSize.ToString());
|
|
||||||
|
|
||||||
// Change size
|
|
||||||
Size = new Size((lastComputedSize.Width) + borderWidth, ((lastComputedSize.Height) + borderHeight));
|
|
||||||
PerformLayout();
|
|
||||||
PresentationPanel.Resized = true;
|
|
||||||
|
|
||||||
// Is window off the screen at this size?
|
|
||||||
if (area.Contains(Bounds) == false)
|
|
||||||
{
|
|
||||||
if (Bounds.Right > area.Right) // Window is off the right edge
|
|
||||||
{
|
|
||||||
Location = new Point(area.Right - Size.Width, Location.Y);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Bounds.Bottom > area.Bottom) // Window is off the bottom edge
|
|
||||||
{
|
|
||||||
Location = new Point(Location.X, area.Bottom - Size.Height);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private Size _lastVideoSize = new Size(-1, -1), _lastVirtualSize = new Size(-1, -1);
|
|
||||||
public void Render()
|
|
||||||
{
|
|
||||||
var video = Emulator.AsVideoProvider();
|
|
||||||
|
|
||||||
Size currVideoSize = new Size(video.BufferWidth, video.BufferHeight);
|
|
||||||
Size currVirtualSize = new Size(video.VirtualWidth, video.VirtualWidth);
|
|
||||||
if (currVideoSize != _lastVideoSize || currVirtualSize != _lastVirtualSize)
|
|
||||||
{
|
|
||||||
_lastVideoSize = currVideoSize;
|
|
||||||
_lastVirtualSize = currVirtualSize;
|
|
||||||
FrameBufferResized();
|
|
||||||
}
|
|
||||||
|
|
||||||
DisplayManager.UpdateSource(video);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void FrameAdvance()
|
|
||||||
{
|
|
||||||
Emulator.FrameAdvance(Global.ControllerOutput, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SaveRam()
|
|
||||||
{
|
|
||||||
if (Emulator.HasSaveRam() && Emulator.AsSaveRam().SaveRamModified)
|
|
||||||
{
|
|
||||||
var path = PathManager.SaveRamPath(Global.Game);
|
|
||||||
var f = new FileInfo(path);
|
|
||||||
if (f.Directory != null && f.Directory.Exists == false)
|
|
||||||
{
|
|
||||||
f.Directory.Create();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Make backup first
|
|
||||||
if (Global.Config.BackupSaveram && f.Exists)
|
|
||||||
{
|
|
||||||
var backup = path + ".bak";
|
|
||||||
var backupFile = new FileInfo(backup);
|
|
||||||
if (backupFile.Exists)
|
|
||||||
{
|
|
||||||
backupFile.Delete();
|
|
||||||
}
|
|
||||||
|
|
||||||
f.CopyTo(backup);
|
|
||||||
}
|
|
||||||
|
|
||||||
var writer = new BinaryWriter(new FileStream(path, FileMode.Create, FileAccess.Write));
|
|
||||||
var saveram = Emulator.AsSaveRam().CloneSaveRam();
|
|
||||||
|
|
||||||
writer.Write(saveram, 0, saveram.Length);
|
|
||||||
writer.Close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,120 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<root>
|
|
||||||
<!--
|
|
||||||
Microsoft ResX Schema
|
|
||||||
|
|
||||||
Version 2.0
|
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
|
||||||
that is mostly human readable. The generation and parsing of the
|
|
||||||
various data types are done through the TypeConverter classes
|
|
||||||
associated with the data types.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
|
||||||
<resheader name="version">2.0</resheader>
|
|
||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
|
||||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
|
||||||
</data>
|
|
||||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
|
||||||
<comment>This is a comment</comment>
|
|
||||||
</data>
|
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
|
||||||
name/value pairs.
|
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
|
||||||
text/value conversion through the TypeConverter architecture.
|
|
||||||
Classes that don't support this are serialized and stored with the
|
|
||||||
mimetype set.
|
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
|
||||||
read any of the formats listed below.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
|
||||||
value : The object must be serialized into a byte array
|
|
||||||
: using a System.ComponentModel.TypeConverter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
-->
|
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
|
||||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:choice maxOccurs="unbounded">
|
|
||||||
<xsd:element name="metadata">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="assembly">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:attribute name="alias" type="xsd:string" />
|
|
||||||
<xsd:attribute name="name" type="xsd:string" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="data">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="resheader">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:choice>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:schema>
|
|
||||||
<resheader name="resmimetype">
|
|
||||||
<value>text/microsoft-resx</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="version">
|
|
||||||
<value>2.0</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="reader">
|
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="writer">
|
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
</root>
|
|
|
@ -1,66 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
|
|
||||||
namespace BizHawk.Client.MultiHawk
|
|
||||||
{
|
|
||||||
public class EmulatorWindowList : List<EmulatorWindow>
|
|
||||||
{
|
|
||||||
public string SessionName { get; set; }
|
|
||||||
|
|
||||||
public EmulatorWindow Master
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (this.Any())
|
|
||||||
{
|
|
||||||
return this.First();
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public IEnumerable<RomSessionEntry> Session
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return this.Select(ew => new RomSessionEntry
|
|
||||||
{
|
|
||||||
RomName = ew.CurrentRomPath,
|
|
||||||
Wndx = ew.Location.X,
|
|
||||||
Wndy = ew.Location.Y
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string SessionJson
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return JsonConvert.SerializeObject(Session);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IEnumerable<RomSessionEntry> FromJson(string json)
|
|
||||||
{
|
|
||||||
return JsonConvert.DeserializeObject<List<RomSessionEntry>>(json);
|
|
||||||
}
|
|
||||||
|
|
||||||
public new void Clear()
|
|
||||||
{
|
|
||||||
SessionName = "";
|
|
||||||
base.Clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
public class RomSessionEntry
|
|
||||||
{
|
|
||||||
public string RomName { get; set; }
|
|
||||||
public int Wndx { get; set; }
|
|
||||||
public int Wndy { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,228 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.IO;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
using BizHawk.Common;
|
|
||||||
|
|
||||||
using BizHawk.Emulation.Common;
|
|
||||||
using BizHawk.Client.Common;
|
|
||||||
|
|
||||||
namespace BizHawk.Client.MultiHawk.ToolExtensions
|
|
||||||
{
|
|
||||||
public static class ToolExtensions
|
|
||||||
{
|
|
||||||
public static ToolStripItem[] RecentMenu(this RecentFiles recent, Action<string> loadFileCallback, bool autoload = false)
|
|
||||||
{
|
|
||||||
var items = new List<ToolStripItem>();
|
|
||||||
|
|
||||||
if (recent.Empty)
|
|
||||||
{
|
|
||||||
var none = new ToolStripMenuItem { Enabled = false, Text = "None" };
|
|
||||||
items.Add(none);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
foreach (var filename in recent)
|
|
||||||
{
|
|
||||||
//TODO - do TSMI and TSDD need disposing? yuck
|
|
||||||
var temp = filename;
|
|
||||||
var item = new ToolStripMenuItem { Text = temp };
|
|
||||||
items.Add(item);
|
|
||||||
|
|
||||||
item.Click += (o, ev) =>
|
|
||||||
{
|
|
||||||
loadFileCallback(temp);
|
|
||||||
};
|
|
||||||
|
|
||||||
//TODO - use standard methods to split filename (hawkfile acquire?)
|
|
||||||
var hf = new HawkFile();
|
|
||||||
hf.Parse(temp);
|
|
||||||
bool canExplore = true;
|
|
||||||
if (!File.Exists(hf.FullPathWithoutMember))
|
|
||||||
canExplore = false;
|
|
||||||
|
|
||||||
var tsdd = new ToolStripDropDownMenu();
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
if (canExplore)
|
|
||||||
{
|
|
||||||
//make a menuitem to show the last modified timestamp
|
|
||||||
// var timestamp = File.GetLastWriteTime(hf.FullPathWithoutMember);
|
|
||||||
// var tsmiTimestamp = new ToolStripLabel { Text = timestamp.ToString() };
|
|
||||||
|
|
||||||
// tsdd.Items.Add(tsmiTimestamp);
|
|
||||||
// tsdd.Items.Add(new ToolStripSeparator());
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// if (hf.IsArchive)
|
|
||||||
// {
|
|
||||||
// //make a menuitem to let you copy the path
|
|
||||||
// var tsmiCopyCanonicalPath = new ToolStripMenuItem { Text = "&Copy Canonical Path" };
|
|
||||||
// tsmiCopyCanonicalPath.Click += (o, ev) => { System.Windows.Forms.Clipboard.SetText(temp); };
|
|
||||||
// tsdd.Items.Add(tsmiCopyCanonicalPath);
|
|
||||||
|
|
||||||
// var tsmiCopyArchivePath = new ToolStripMenuItem { Text = "Copy Archive Path" };
|
|
||||||
// tsmiCopyArchivePath.Click += (o, ev) => { System.Windows.Forms.Clipboard.SetText(hf.FullPathWithoutMember); };
|
|
||||||
// tsdd.Items.Add(tsmiCopyArchivePath);
|
|
||||||
|
|
||||||
// var tsmiOpenArchive = new ToolStripMenuItem { Text = "Open &Archive" };
|
|
||||||
// tsmiOpenArchive.Click += (o, ev) => { System.Diagnostics.Process.Start(hf.FullPathWithoutMember); };
|
|
||||||
// tsdd.Items.Add(tsmiOpenArchive);
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// //make a menuitem to let you copy the path
|
|
||||||
// var tsmiCopyPath = new ToolStripMenuItem { Text = "&Copy Path" };
|
|
||||||
// tsmiCopyPath.Click += (o, ev) => { System.Windows.Forms.Clipboard.SetText(temp); };
|
|
||||||
// tsdd.Items.Add(tsmiCopyPath);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// tsdd.Items.Add(new ToolStripSeparator());
|
|
||||||
|
|
||||||
// //make a menuitem to let you explore to it
|
|
||||||
// var tsmiExplore = new ToolStripMenuItem { Text = "&Explore" };
|
|
||||||
// string explorePath = "\"" + hf.FullPathWithoutMember + "\"";
|
|
||||||
// tsmiExplore.Click += (o, ev) => { System.Diagnostics.Process.Start("explorer.exe", "/select, " + explorePath); };
|
|
||||||
// tsdd.Items.Add(tsmiExplore);
|
|
||||||
|
|
||||||
// var tsmiCopyFile = new ToolStripMenuItem { Text = "Copy &File" };
|
|
||||||
// var lame = new System.Collections.Specialized.StringCollection();
|
|
||||||
// lame.Add(hf.FullPathWithoutMember);
|
|
||||||
// tsmiCopyFile.Click += (o, ev) => { System.Windows.Forms.Clipboard.SetFileDropList(lame); };
|
|
||||||
// tsdd.Items.Add(tsmiCopyFile);
|
|
||||||
|
|
||||||
// var tsmiTest = new ToolStripMenuItem { Text = "&Shell Context Menu" };
|
|
||||||
// tsmiTest.Click += (o, ev) => {
|
|
||||||
// var si = new GongSolutions.Shell.ShellItem(hf.FullPathWithoutMember);
|
|
||||||
// var scm = new GongSolutions.Shell.ShellContextMenu(si);
|
|
||||||
// var tsddi = o as ToolStripDropDownItem;
|
|
||||||
// tsddi.Owner.Update();
|
|
||||||
// scm.ShowContextMenu(tsddi.Owner, new System.Drawing.Point(0, 0));
|
|
||||||
// };
|
|
||||||
// tsdd.Items.Add(tsmiTest);
|
|
||||||
|
|
||||||
// tsdd.Items.Add(new ToolStripSeparator());
|
|
||||||
//}
|
|
||||||
//else
|
|
||||||
//{
|
|
||||||
// //make a menuitem to show the last modified timestamp
|
|
||||||
// var tsmiMissingFile = new ToolStripLabel { Text = "-Missing-" };
|
|
||||||
// tsdd.Items.Add(tsmiMissingFile);
|
|
||||||
// tsdd.Items.Add(new ToolStripSeparator());
|
|
||||||
//}
|
|
||||||
|
|
||||||
////in either case, make a menuitem to let you remove the path
|
|
||||||
//var tsmiRemovePath = new ToolStripMenuItem { Text = "&Remove" };
|
|
||||||
//tsmiRemovePath.Click += (o, ev) => { recent.Remove(temp); };
|
|
||||||
|
|
||||||
//tsdd.Items.Add(tsmiRemovePath);
|
|
||||||
|
|
||||||
//////experiment of popping open a submenu. doesnt work well.
|
|
||||||
////item.MouseDown += (o, mev) =>
|
|
||||||
////{
|
|
||||||
//// if (mev.Button != MouseButtons.Right) return;
|
|
||||||
//// //location of the menu containing this item that was just rightclicked
|
|
||||||
//// var pos = item.Owner.Bounds.Location;
|
|
||||||
//// //the offset within that menu of this item
|
|
||||||
//// var tsddi = item as ToolStripDropDownItem;
|
|
||||||
//// pos.Offset(tsddi.Bounds.Location);
|
|
||||||
//// //the offset of the click
|
|
||||||
//// pos.Offset(mev.Location);
|
|
||||||
//// //tsdd.OwnerItem = item; //has interesting promise, but breaks things otherwise
|
|
||||||
//// tsdd.Show(pos);
|
|
||||||
////};
|
|
||||||
|
|
||||||
////just add it to the submenu for now
|
|
||||||
//item.MouseDown += (o, mev) =>
|
|
||||||
//{
|
|
||||||
// if (mev.Button != MouseButtons.Right) return;
|
|
||||||
// if (item.DropDown != null)
|
|
||||||
// item.DropDown = tsdd;
|
|
||||||
// item.ShowDropDown();
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
items.Add(new ToolStripSeparator());
|
|
||||||
|
|
||||||
var clearitem = new ToolStripMenuItem { Text = "&Clear", Enabled = !recent.Frozen };
|
|
||||||
clearitem.Click += (o, ev) => recent.Clear();
|
|
||||||
items.Add(clearitem);
|
|
||||||
|
|
||||||
var freezeitem = new ToolStripMenuItem { Text = recent.Frozen ? "&Unfreeze" : "&Freeze" };
|
|
||||||
freezeitem.Click += (o, ev) => recent.Frozen ^= true;
|
|
||||||
items.Add(freezeitem);
|
|
||||||
|
|
||||||
if (autoload)
|
|
||||||
{
|
|
||||||
var auto = new ToolStripMenuItem { Text = "&Autoload", Checked = recent.AutoLoad };
|
|
||||||
auto.Click += (o, ev) => recent.ToggleAutoLoad();
|
|
||||||
items.Add(auto);
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
//var settingsitem = new ToolStripMenuItem { Text = "&Recent Settings..." };
|
|
||||||
//settingsitem.Click += (o, ev) =>
|
|
||||||
//{
|
|
||||||
// using (var prompt = new InputPrompt
|
|
||||||
// {
|
|
||||||
// TextInputType = InputPrompt.InputType.Unsigned,
|
|
||||||
// Message = "Number of recent files to track",
|
|
||||||
// InitialValue = recent.MAX_RECENT_FILES.ToString()
|
|
||||||
// })
|
|
||||||
// {
|
|
||||||
// var result = prompt.ShowDialog();
|
|
||||||
// if (result == DialogResult.OK)
|
|
||||||
// {
|
|
||||||
// int val = int.Parse(prompt.PromptText);
|
|
||||||
// if (val > 0)
|
|
||||||
// recent.MAX_RECENT_FILES = val;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//};
|
|
||||||
//items.Add(settingsitem);
|
|
||||||
|
|
||||||
return items.ToArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void HandleLoadError(this RecentFiles recent, string path)
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
//GlobalWin.Sound.StopSound();
|
|
||||||
if (recent.Frozen)
|
|
||||||
{
|
|
||||||
var result = MessageBox.Show("Could not open " + path, "File not found", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var result = MessageBox.Show("Could not open " + path + "\nRemove from list?", "File not found", MessageBoxButtons.YesNo, MessageBoxIcon.Error);
|
|
||||||
if (result == DialogResult.Yes)
|
|
||||||
{
|
|
||||||
recent.Remove(path);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//GlobalWin.Sound.StartSound();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IEnumerable<ToolStripItem> MenuItems(this IMemoryDomains domains, Action<string> setCallback, string selected = "", int? maxSize = null)
|
|
||||||
{
|
|
||||||
foreach (var domain in domains)
|
|
||||||
{
|
|
||||||
var name = domain.Name;
|
|
||||||
var item = new ToolStripMenuItem
|
|
||||||
{
|
|
||||||
Text = name,
|
|
||||||
Enabled = !(maxSize.HasValue && domain.Size > maxSize.Value),
|
|
||||||
Checked = name == selected
|
|
||||||
};
|
|
||||||
item.Click += (o, ev) => setCallback(name);
|
|
||||||
|
|
||||||
yield return item;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,25 +0,0 @@
|
||||||
using BizHawk.Client.Common;
|
|
||||||
using BizHawk.Bizware.BizwareGL;
|
|
||||||
using SlimDX.DirectSound;
|
|
||||||
|
|
||||||
namespace BizHawk.Client.MultiHawk
|
|
||||||
{
|
|
||||||
public static class GlobalWin
|
|
||||||
{
|
|
||||||
public static Mainform MainForm;
|
|
||||||
//public static ToolManager Tools;
|
|
||||||
public static IGL GL;
|
|
||||||
public static Bizware.BizwareGL.Drivers.OpenTK.IGL_TK IGL_GL;
|
|
||||||
public static BizHawk.Client.EmuHawk.GLManager.ContextRef CR_GL;
|
|
||||||
//public static Sound Sound;
|
|
||||||
//public static PresentationPanel PresentationPanel;
|
|
||||||
//public static OSDManager OSD = new OSDManager();
|
|
||||||
//public static DisplayManager DisplayManager;
|
|
||||||
public static BizHawk.Client.EmuHawk.GLManager GLManager;
|
|
||||||
|
|
||||||
//input state which has been destined for game controller inputs are coalesced here
|
|
||||||
//public static ControllerInputCoalescer ControllerInputCoalescer = new ControllerInputCoalescer();
|
|
||||||
//input state which has been destined for client hotkey consumption are colesced here
|
|
||||||
public static InputCoalescer HotkeyCoalescer = new InputCoalescer();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,235 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using SlimDX;
|
|
||||||
using SlimDX.DirectInput;
|
|
||||||
|
|
||||||
namespace BizHawk.Client.MultiHawk
|
|
||||||
{
|
|
||||||
public class GamePad
|
|
||||||
{
|
|
||||||
// ********************************** Static interface **********************************
|
|
||||||
|
|
||||||
static DirectInput dinput;
|
|
||||||
public static List<GamePad> Devices;
|
|
||||||
|
|
||||||
public static void Initialize(IntPtr parent)
|
|
||||||
{
|
|
||||||
if (dinput == null)
|
|
||||||
dinput = new DirectInput();
|
|
||||||
|
|
||||||
Devices = new List<GamePad>();
|
|
||||||
|
|
||||||
foreach (DeviceInstance device in dinput.GetDevices(DeviceClass.GameController, DeviceEnumerationFlags.AttachedOnly))
|
|
||||||
{
|
|
||||||
Console.WriteLine("joydevice: {0} `{1}`", device.InstanceGuid, device.ProductName);
|
|
||||||
|
|
||||||
if (device.ProductName.Contains("XBOX 360"))
|
|
||||||
continue; // Don't input XBOX 360 controllers into here; we'll process them via XInput (there are limitations in some trigger axes when xbox pads go over xinput)
|
|
||||||
|
|
||||||
var joystick = new Joystick(dinput, device.InstanceGuid);
|
|
||||||
joystick.SetCooperativeLevel(parent, CooperativeLevel.Background | CooperativeLevel.Nonexclusive);
|
|
||||||
foreach (DeviceObjectInstance deviceObject in joystick.GetObjects())
|
|
||||||
{
|
|
||||||
if ((deviceObject.ObjectType & ObjectDeviceType.Axis) != 0)
|
|
||||||
joystick.GetObjectPropertiesById((int)deviceObject.ObjectType).SetRange(-1000, 1000);
|
|
||||||
}
|
|
||||||
joystick.Acquire();
|
|
||||||
|
|
||||||
GamePad p = new GamePad(device.InstanceName, device.InstanceGuid, joystick);
|
|
||||||
Devices.Add(p);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void UpdateAll()
|
|
||||||
{
|
|
||||||
foreach (var device in Devices)
|
|
||||||
device.Update();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void CloseAll()
|
|
||||||
{
|
|
||||||
if (Devices != null)
|
|
||||||
{
|
|
||||||
foreach (var device in Devices)
|
|
||||||
device.joystick.Dispose();
|
|
||||||
Devices.Clear();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ********************************** Instance Members **********************************
|
|
||||||
|
|
||||||
readonly string name;
|
|
||||||
readonly Guid guid;
|
|
||||||
readonly Joystick joystick;
|
|
||||||
JoystickState state = new JoystickState();
|
|
||||||
|
|
||||||
GamePad(string name, Guid guid, Joystick joystick)
|
|
||||||
{
|
|
||||||
this.name = name;
|
|
||||||
this.guid = guid;
|
|
||||||
this.joystick = joystick;
|
|
||||||
Update();
|
|
||||||
InitializeCallbacks();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Update()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (joystick.Acquire().IsFailure)
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (joystick.Poll().IsFailure)
|
|
||||||
return;
|
|
||||||
|
|
||||||
state = joystick.GetCurrentState();
|
|
||||||
if (Result.Last.IsFailure)
|
|
||||||
// do something?
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
public IEnumerable<Tuple<string, float>> GetFloats()
|
|
||||||
{
|
|
||||||
var pis = typeof(JoystickState).GetProperties();
|
|
||||||
foreach (var pi in pis)
|
|
||||||
yield return new Tuple<string, float>(pi.Name, 10.0f * (float)(int)pi.GetValue(state, null));
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>FOR DEBUGGING ONLY</summary>
|
|
||||||
public JoystickState GetInternalState()
|
|
||||||
{
|
|
||||||
return state;
|
|
||||||
}
|
|
||||||
|
|
||||||
public string Name { get { return name; } }
|
|
||||||
public Guid Guid { get { return guid; } }
|
|
||||||
|
|
||||||
|
|
||||||
public string ButtonName(int index)
|
|
||||||
{
|
|
||||||
return names[index];
|
|
||||||
}
|
|
||||||
public bool Pressed(int index)
|
|
||||||
{
|
|
||||||
return actions[index]();
|
|
||||||
}
|
|
||||||
public int NumButtons { get; private set; }
|
|
||||||
|
|
||||||
private readonly List<string> names = new List<string>();
|
|
||||||
private readonly List<Func<bool>> actions = new List<Func<bool>>();
|
|
||||||
|
|
||||||
void AddItem(string _name, Func<bool> callback)
|
|
||||||
{
|
|
||||||
names.Add(_name);
|
|
||||||
actions.Add(callback);
|
|
||||||
NumButtons++;
|
|
||||||
}
|
|
||||||
|
|
||||||
void InitializeCallbacks()
|
|
||||||
{
|
|
||||||
const int dzp = 400;
|
|
||||||
const int dzn = -400;
|
|
||||||
|
|
||||||
names.Clear();
|
|
||||||
actions.Clear();
|
|
||||||
NumButtons = 0;
|
|
||||||
|
|
||||||
AddItem("AccelerationX+", () => state.AccelerationX >= dzp);
|
|
||||||
AddItem("AccelerationX-", () => state.AccelerationX <= dzn);
|
|
||||||
AddItem("AccelerationY+", () => state.AccelerationY >= dzp);
|
|
||||||
AddItem("AccelerationY-", () => state.AccelerationY <= dzn);
|
|
||||||
AddItem("AccelerationZ+", () => state.AccelerationZ >= dzp);
|
|
||||||
AddItem("AccelerationZ-", () => state.AccelerationZ <= dzn);
|
|
||||||
AddItem("AngularAccelerationX+", () => state.AngularAccelerationX >= dzp);
|
|
||||||
AddItem("AngularAccelerationX-", () => state.AngularAccelerationX <= dzn);
|
|
||||||
AddItem("AngularAccelerationY+", () => state.AngularAccelerationY >= dzp);
|
|
||||||
AddItem("AngularAccelerationY-", () => state.AngularAccelerationY <= dzn);
|
|
||||||
AddItem("AngularAccelerationZ+", () => state.AngularAccelerationZ >= dzp);
|
|
||||||
AddItem("AngularAccelerationZ-", () => state.AngularAccelerationZ <= dzn);
|
|
||||||
AddItem("AngularVelocityX+", () => state.AngularVelocityX >= dzp);
|
|
||||||
AddItem("AngularVelocityX-", () => state.AngularVelocityX <= dzn);
|
|
||||||
AddItem("AngularVelocityY+", () => state.AngularVelocityY >= dzp);
|
|
||||||
AddItem("AngularVelocityY-", () => state.AngularVelocityY <= dzn);
|
|
||||||
AddItem("AngularVelocityZ+", () => state.AngularVelocityZ >= dzp);
|
|
||||||
AddItem("AngularVelocityZ-", () => state.AngularVelocityZ <= dzn);
|
|
||||||
AddItem("ForceX+", () => state.ForceX >= dzp);
|
|
||||||
AddItem("ForceX-", () => state.ForceX <= dzn);
|
|
||||||
AddItem("ForceY+", () => state.ForceY >= dzp);
|
|
||||||
AddItem("ForceY-", () => state.ForceY <= dzn);
|
|
||||||
AddItem("ForceZ+", () => state.ForceZ >= dzp);
|
|
||||||
AddItem("ForceZ-", () => state.ForceZ <= dzn);
|
|
||||||
AddItem("RotationX+", () => state.RotationX >= dzp);
|
|
||||||
AddItem("RotationX-", () => state.RotationX <= dzn);
|
|
||||||
AddItem("RotationY+", () => state.RotationY >= dzp);
|
|
||||||
AddItem("RotationY-", () => state.RotationY <= dzn);
|
|
||||||
AddItem("RotationZ+", () => state.RotationZ >= dzp);
|
|
||||||
AddItem("RotationZ-", () => state.RotationZ <= dzn);
|
|
||||||
AddItem("TorqueX+", () => state.TorqueX >= dzp);
|
|
||||||
AddItem("TorqueX-", () => state.TorqueX <= dzn);
|
|
||||||
AddItem("TorqueY+", () => state.TorqueY >= dzp);
|
|
||||||
AddItem("TorqueY-", () => state.TorqueY <= dzn);
|
|
||||||
AddItem("TorqueZ+", () => state.TorqueZ >= dzp);
|
|
||||||
AddItem("TorqueZ-", () => state.TorqueZ <= dzn);
|
|
||||||
AddItem("VelocityX+", () => state.VelocityX >= dzp);
|
|
||||||
AddItem("VelocityX-", () => state.VelocityX <= dzn);
|
|
||||||
AddItem("VelocityY+", () => state.VelocityY >= dzp);
|
|
||||||
AddItem("VelocityY-", () => state.VelocityY <= dzn);
|
|
||||||
AddItem("VelocityZ+", () => state.VelocityZ >= dzp);
|
|
||||||
AddItem("VelocityZ-", () => state.VelocityZ <= dzn);
|
|
||||||
AddItem("X+", () => state.X >= dzp);
|
|
||||||
AddItem("X-", () => state.X <= dzn);
|
|
||||||
AddItem("Y+", () => state.Y >= dzp);
|
|
||||||
AddItem("Y-", () => state.Y <= dzn);
|
|
||||||
AddItem("Z+", () => state.Z >= dzp);
|
|
||||||
AddItem("Z-", () => state.Z <= dzn);
|
|
||||||
|
|
||||||
// i don't know what the "Slider"s do, so they're omitted for the moment
|
|
||||||
|
|
||||||
for (int i = 0; i < state.GetButtons().Length; i++)
|
|
||||||
{
|
|
||||||
int j = i;
|
|
||||||
AddItem($"B{i + 1}", () => state.IsPressed(j));
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = 0; i < state.GetPointOfViewControllers().Length; i++)
|
|
||||||
{
|
|
||||||
int j = i;
|
|
||||||
AddItem($"POV{i + 1}U",
|
|
||||||
() => { int t = state.GetPointOfViewControllers()[j]; return (t >= 0 && t <= 4500) || (t >= 31500 && t < 36000); });
|
|
||||||
AddItem($"POV{i + 1}D",
|
|
||||||
() => { int t = state.GetPointOfViewControllers()[j]; return t >= 13500 && t <= 22500; });
|
|
||||||
AddItem($"POV{i + 1}L",
|
|
||||||
() => { int t = state.GetPointOfViewControllers()[j]; return t >= 22500 && t <= 31500; });
|
|
||||||
AddItem($"POV{i + 1}R",
|
|
||||||
() => { int t = state.GetPointOfViewControllers()[j]; return t >= 4500 && t <= 13500; });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Note that this does not appear to work at this time. I probably need to have more infos.
|
|
||||||
public void SetVibration(int left, int right)
|
|
||||||
{
|
|
||||||
int[] temp1, temp2;
|
|
||||||
// my first clue that it doesnt work is that LEFT and RIGHT _ARENT USED_
|
|
||||||
// I should just look for C++ examples instead of trying to look for SlimDX examples
|
|
||||||
|
|
||||||
var parameters = new EffectParameters
|
|
||||||
{
|
|
||||||
Duration = 0x2710,
|
|
||||||
Gain = 0x2710,
|
|
||||||
SamplePeriod = 0,
|
|
||||||
TriggerButton = 0,
|
|
||||||
TriggerRepeatInterval = 0x2710,
|
|
||||||
Flags = EffectFlags.None
|
|
||||||
};
|
|
||||||
parameters.GetAxes(out temp1, out temp2);
|
|
||||||
parameters.SetAxes(temp1, temp2);
|
|
||||||
var effect = new Effect(joystick, EffectGuid.ConstantForce);
|
|
||||||
effect.SetParameters(parameters);
|
|
||||||
effect.Start(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,511 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Threading;
|
|
||||||
#if WINDOWS
|
|
||||||
using SlimDX.DirectInput;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using BizHawk.Common;
|
|
||||||
using BizHawk.Client.Common;
|
|
||||||
|
|
||||||
namespace BizHawk.Client.MultiHawk
|
|
||||||
{
|
|
||||||
//coalesces events back into instantaneous states
|
|
||||||
public class InputCoalescer : SimpleController
|
|
||||||
{
|
|
||||||
public void Receive(Input.InputEvent ie)
|
|
||||||
{
|
|
||||||
bool state = ie.EventType == Input.InputEventType.Press;
|
|
||||||
|
|
||||||
string button = ie.LogicalButton.ToString();
|
|
||||||
Buttons[button] = state;
|
|
||||||
|
|
||||||
//when a button is released, all modified variants of it are released as well
|
|
||||||
if (!state)
|
|
||||||
{
|
|
||||||
var releases = Buttons.Where(kvp => kvp.Key.Contains("+") && kvp.Key.EndsWith(ie.LogicalButton.Button)).ToArray();
|
|
||||||
foreach (var kvp in releases)
|
|
||||||
Buttons[kvp.Key] = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class ControllerInputCoalescer : SimpleController
|
|
||||||
{
|
|
||||||
public void Receive(Input.InputEvent ie)
|
|
||||||
{
|
|
||||||
bool state = ie.EventType == Input.InputEventType.Press;
|
|
||||||
|
|
||||||
string button = ie.LogicalButton.ToString();
|
|
||||||
Buttons[button] = state;
|
|
||||||
|
|
||||||
//For controller input, we want Shift+X to register as both Shift and X (for Keyboard controllers)
|
|
||||||
string[] subgroups = button.Split('+');
|
|
||||||
if (subgroups.Length > 0)
|
|
||||||
{
|
|
||||||
foreach (string s in subgroups)
|
|
||||||
{
|
|
||||||
Buttons[s] = state;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//when a button is released, all modified variants of it are released as well
|
|
||||||
if (!state)
|
|
||||||
{
|
|
||||||
var releases = Buttons.Where((kvp) => kvp.Key.Contains("+") && kvp.Key.EndsWith(ie.LogicalButton.Button)).ToArray();
|
|
||||||
foreach (var kvp in releases)
|
|
||||||
Buttons[kvp.Key] = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Input
|
|
||||||
{
|
|
||||||
[Flags]
|
|
||||||
public enum InputFocus
|
|
||||||
{
|
|
||||||
None = 0,
|
|
||||||
Mouse = 1,
|
|
||||||
Keyboard = 2,
|
|
||||||
Pad = 4
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// If your form needs this kind of input focus, be sure to say so.
|
|
||||||
/// Really, this only makes sense for mouse, but I've started building it out for other things
|
|
||||||
/// Why is this receiving a control, but actually using it as a Form (where the WantingMouseFocus is checked?)
|
|
||||||
/// Because later we might change it to work off the control, specifically, if a control is supplied (normally actually a Form will be supplied)
|
|
||||||
/// </summary>
|
|
||||||
public void ControlInputFocus(System.Windows.Forms.Control c, InputFocus types, bool wants)
|
|
||||||
{
|
|
||||||
if (types.HasFlag(InputFocus.Mouse) && wants) WantingMouseFocus.Add(c);
|
|
||||||
if (types.HasFlag(InputFocus.Mouse) && !wants) WantingMouseFocus.Remove(c);
|
|
||||||
}
|
|
||||||
|
|
||||||
HashSet<System.Windows.Forms.Control> WantingMouseFocus = new HashSet<System.Windows.Forms.Control>();
|
|
||||||
|
|
||||||
[Flags]
|
|
||||||
public enum ModifierKey
|
|
||||||
{
|
|
||||||
// Summary:
|
|
||||||
// The bitmask to extract modifiers from a key value.
|
|
||||||
Modifiers = -65536,
|
|
||||||
//
|
|
||||||
// Summary:
|
|
||||||
// No key pressed.
|
|
||||||
None = 0,
|
|
||||||
//
|
|
||||||
// Summary:
|
|
||||||
// The SHIFT modifier key.
|
|
||||||
Shift = 65536,
|
|
||||||
//
|
|
||||||
// Summary:
|
|
||||||
// The CTRL modifier key.
|
|
||||||
Control = 131072,
|
|
||||||
//
|
|
||||||
// Summary:
|
|
||||||
// The ALT modifier key.
|
|
||||||
Alt = 262144,
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Input Instance { get; private set; }
|
|
||||||
readonly Thread UpdateThread;
|
|
||||||
|
|
||||||
private Input()
|
|
||||||
{
|
|
||||||
#if WINDOWS
|
|
||||||
UpdateThread = new Thread(UpdateThreadProc)
|
|
||||||
{
|
|
||||||
IsBackground = true,
|
|
||||||
Priority = ThreadPriority.AboveNormal //why not? this thread shouldn't be very heavy duty, and we want it to be responsive
|
|
||||||
};
|
|
||||||
UpdateThread.Start();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Initialize(IntPtr parent)
|
|
||||||
{
|
|
||||||
#if WINDOWS
|
|
||||||
KeyInput.Initialize(parent);
|
|
||||||
GamePad.Initialize(parent);
|
|
||||||
BizHawk.Client.EmuHawk.GamePad360.Initialize();
|
|
||||||
#endif
|
|
||||||
Instance = new Input();
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum InputEventType
|
|
||||||
{
|
|
||||||
Press, Release
|
|
||||||
}
|
|
||||||
public struct LogicalButton
|
|
||||||
{
|
|
||||||
public LogicalButton(string button, ModifierKey modifiers)
|
|
||||||
{
|
|
||||||
Button = button;
|
|
||||||
Modifiers = modifiers;
|
|
||||||
}
|
|
||||||
public readonly string Button;
|
|
||||||
public readonly ModifierKey Modifiers;
|
|
||||||
|
|
||||||
public bool Alt { get { return ((Modifiers & ModifierKey.Alt) != 0); } }
|
|
||||||
public bool Control { get { return ((Modifiers & ModifierKey.Control) != 0); } }
|
|
||||||
public bool Shift { get { return ((Modifiers & ModifierKey.Shift) != 0); } }
|
|
||||||
|
|
||||||
public override string ToString()
|
|
||||||
{
|
|
||||||
string ret = "";
|
|
||||||
if (Control) ret += "Ctrl+";
|
|
||||||
if (Alt) ret += "Alt+";
|
|
||||||
if (Shift) ret += "Shift+";
|
|
||||||
ret += Button;
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
public override bool Equals(object obj)
|
|
||||||
{
|
|
||||||
var other = (LogicalButton)obj;
|
|
||||||
return other == this;
|
|
||||||
}
|
|
||||||
public override int GetHashCode()
|
|
||||||
{
|
|
||||||
return Button.GetHashCode() ^ Modifiers.GetHashCode();
|
|
||||||
}
|
|
||||||
public static bool operator ==(LogicalButton lhs, LogicalButton rhs)
|
|
||||||
{
|
|
||||||
return lhs.Button == rhs.Button && lhs.Modifiers == rhs.Modifiers;
|
|
||||||
}
|
|
||||||
public static bool operator !=(LogicalButton lhs, LogicalButton rhs)
|
|
||||||
{
|
|
||||||
return !(lhs == rhs);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public class InputEvent
|
|
||||||
{
|
|
||||||
public LogicalButton LogicalButton;
|
|
||||||
public InputEventType EventType;
|
|
||||||
public override string ToString() => $"{EventType.ToString()}:{LogicalButton.ToString()}";
|
|
||||||
}
|
|
||||||
|
|
||||||
private readonly WorkingDictionary<string, object> ModifierState = new WorkingDictionary<string, object>();
|
|
||||||
private readonly WorkingDictionary<string, bool> LastState = new WorkingDictionary<string, bool>();
|
|
||||||
private readonly WorkingDictionary<string, bool> UnpressState = new WorkingDictionary<string, bool>();
|
|
||||||
private readonly HashSet<string> IgnoreKeys = new HashSet<string>(new[] { "LeftShift", "RightShift", "LeftControl", "RightControl", "LeftAlt", "RightAlt" });
|
|
||||||
private readonly WorkingDictionary<string, float> FloatValues = new WorkingDictionary<string, float>();
|
|
||||||
private readonly WorkingDictionary<string, float> FloatDeltas = new WorkingDictionary<string, float>();
|
|
||||||
private bool trackdeltas = false;
|
|
||||||
|
|
||||||
void HandleButton(string button, bool newState)
|
|
||||||
{
|
|
||||||
bool isModifier = IgnoreKeys.Contains(button);
|
|
||||||
if (EnableIgnoreModifiers && isModifier) return;
|
|
||||||
if (LastState[button] && newState) return;
|
|
||||||
if (!LastState[button] && !newState) return;
|
|
||||||
|
|
||||||
//apply
|
|
||||||
//NOTE: this is not quite right. if someone held leftshift+rightshift it would be broken. seems unlikely, though.
|
|
||||||
if (button == "LeftShift")
|
|
||||||
{
|
|
||||||
_Modifiers &= ~ModifierKey.Shift;
|
|
||||||
if (newState)
|
|
||||||
_Modifiers |= ModifierKey.Shift;
|
|
||||||
}
|
|
||||||
if (button == "RightShift") { _Modifiers &= ~ModifierKey.Shift; if (newState) _Modifiers |= ModifierKey.Shift; }
|
|
||||||
if (button == "LeftControl") { _Modifiers &= ~ModifierKey.Control; if (newState) _Modifiers |= ModifierKey.Control; }
|
|
||||||
if (button == "RightControl") { _Modifiers &= ~ModifierKey.Control; if (newState) _Modifiers |= ModifierKey.Control; }
|
|
||||||
if (button == "LeftAlt") { _Modifiers &= ~ModifierKey.Alt; if (newState) _Modifiers |= ModifierKey.Alt; }
|
|
||||||
if (button == "RightAlt") { _Modifiers &= ~ModifierKey.Alt; if (newState) _Modifiers |= ModifierKey.Alt; }
|
|
||||||
|
|
||||||
if (UnpressState.ContainsKey(button))
|
|
||||||
{
|
|
||||||
if (newState) return;
|
|
||||||
Console.WriteLine($"Removing Unpress {button} with {nameof(newState)} {newState}");
|
|
||||||
UnpressState.Remove(button);
|
|
||||||
LastState[button] = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//dont generate events for things like Ctrl+LeftControl
|
|
||||||
ModifierKey mods = _Modifiers;
|
|
||||||
if (button == "LeftShift") mods &= ~ModifierKey.Shift;
|
|
||||||
if (button == "RightShift") mods &= ~ModifierKey.Shift;
|
|
||||||
if (button == "LeftControl") mods &= ~ModifierKey.Control;
|
|
||||||
if (button == "RightControl") mods &= ~ModifierKey.Control;
|
|
||||||
if (button == "LeftAlt") mods &= ~ModifierKey.Alt;
|
|
||||||
if (button == "RightAlt") mods &= ~ModifierKey.Alt;
|
|
||||||
|
|
||||||
var ie = new InputEvent
|
|
||||||
{
|
|
||||||
EventType = newState ? InputEventType.Press : InputEventType.Release,
|
|
||||||
LogicalButton = new LogicalButton(button, mods)
|
|
||||||
};
|
|
||||||
LastState[button] = newState;
|
|
||||||
|
|
||||||
//track the pressed events with modifiers that we send so that we can send corresponding unpresses with modifiers
|
|
||||||
//this is an interesting idea, which we may need later, but not yet.
|
|
||||||
//for example, you may see this series of events: press:ctrl+c, release:ctrl, release:c
|
|
||||||
//but you might would rather have press:ctr+c, release:ctrl+c
|
|
||||||
//this code relates the releases to the original presses.
|
|
||||||
//UPDATE - this is necessary for the frame advance key, which has a special meaning when it gets stuck down
|
|
||||||
//so, i am adding it as of 11-sep-2011
|
|
||||||
if (newState)
|
|
||||||
{
|
|
||||||
ModifierState[button] = ie.LogicalButton;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (ModifierState[button] != null)
|
|
||||||
{
|
|
||||||
LogicalButton alreadyReleased = ie.LogicalButton;
|
|
||||||
var ieModified = new InputEvent
|
|
||||||
{
|
|
||||||
LogicalButton = (LogicalButton)ModifierState[button],
|
|
||||||
EventType = InputEventType.Release
|
|
||||||
};
|
|
||||||
if (ieModified.LogicalButton != alreadyReleased)
|
|
||||||
_NewEvents.Add(ieModified);
|
|
||||||
}
|
|
||||||
ModifierState[button] = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
_NewEvents.Add(ie);
|
|
||||||
}
|
|
||||||
|
|
||||||
ModifierKey _Modifiers;
|
|
||||||
private readonly List<InputEvent> _NewEvents = new List<InputEvent>();
|
|
||||||
|
|
||||||
//do we need this?
|
|
||||||
public void ClearEvents()
|
|
||||||
{
|
|
||||||
lock (this)
|
|
||||||
{
|
|
||||||
InputEvents.Clear();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private readonly Queue<InputEvent> InputEvents = new Queue<InputEvent>();
|
|
||||||
public InputEvent DequeueEvent()
|
|
||||||
{
|
|
||||||
lock (this)
|
|
||||||
{
|
|
||||||
if (InputEvents.Count == 0) return null;
|
|
||||||
else return InputEvents.Dequeue();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
void EnqueueEvent(InputEvent ie)
|
|
||||||
{
|
|
||||||
lock (this)
|
|
||||||
{
|
|
||||||
InputEvents.Enqueue(ie);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<Tuple<string, float>> GetFloats()
|
|
||||||
{
|
|
||||||
List<Tuple<string, float>> FloatValuesCopy = new List<Tuple<string,float>>();
|
|
||||||
lock (FloatValues)
|
|
||||||
{
|
|
||||||
foreach (var kvp in FloatValues)
|
|
||||||
FloatValuesCopy.Add(new Tuple<string, float>(kvp.Key, kvp.Value));
|
|
||||||
}
|
|
||||||
return FloatValuesCopy;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if WINDOWS
|
|
||||||
void UpdateThreadProc()
|
|
||||||
{
|
|
||||||
for (; ; )
|
|
||||||
{
|
|
||||||
var keyEvents = KeyInput.Update();
|
|
||||||
GamePad.UpdateAll();
|
|
||||||
BizHawk.Client.EmuHawk.GamePad360.UpdateAll();
|
|
||||||
|
|
||||||
//this block is going to massively modify data structures that the binding method uses, so we have to lock it all
|
|
||||||
lock (this)
|
|
||||||
{
|
|
||||||
_NewEvents.Clear();
|
|
||||||
|
|
||||||
//analyze keys
|
|
||||||
foreach (var ke in keyEvents)
|
|
||||||
HandleButton(ke.Key.ToString(), ke.Pressed);
|
|
||||||
|
|
||||||
lock (FloatValues)
|
|
||||||
{
|
|
||||||
//FloatValues.Clear();
|
|
||||||
|
|
||||||
//analyze xinput
|
|
||||||
foreach (var pad in BizHawk.Client.EmuHawk.GamePad360.EnumerateDevices())
|
|
||||||
{
|
|
||||||
string xname = "X" + pad.PlayerNumber + " ";
|
|
||||||
for (int b = 0; b < pad.NumButtons; b++)
|
|
||||||
HandleButton(xname + pad.ButtonName(b), pad.Pressed(b));
|
|
||||||
foreach (var sv in pad.GetFloats())
|
|
||||||
{
|
|
||||||
string n = xname + sv.Item1;
|
|
||||||
float f = sv.Item2;
|
|
||||||
if (trackdeltas)
|
|
||||||
FloatDeltas[n] += Math.Abs(f - FloatValues[n]);
|
|
||||||
FloatValues[n] = f;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//analyze joysticks
|
|
||||||
for (int i = 0; i < GamePad.Devices.Count; i++)
|
|
||||||
{
|
|
||||||
var pad = GamePad.Devices[i];
|
|
||||||
string jname = "J" + (i + 1) + " ";
|
|
||||||
|
|
||||||
for (int b = 0; b < pad.NumButtons; b++)
|
|
||||||
HandleButton(jname + pad.ButtonName(b), pad.Pressed(b));
|
|
||||||
foreach (var sv in pad.GetFloats())
|
|
||||||
{
|
|
||||||
string n = jname + sv.Item1;
|
|
||||||
float f = sv.Item2;
|
|
||||||
//if (n == "J5 RotationZ")
|
|
||||||
// System.Diagnostics.Debugger.Break();
|
|
||||||
if (trackdeltas)
|
|
||||||
FloatDeltas[n] += Math.Abs(f - FloatValues[n]);
|
|
||||||
FloatValues[n] = f;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// analyse moose
|
|
||||||
// other sorts of mouse api (raw input) could easily be added as a separate listing under a different class
|
|
||||||
if (WantingMouseFocus.Contains(System.Windows.Forms.Form.ActiveForm))
|
|
||||||
{
|
|
||||||
var P = System.Windows.Forms.Control.MousePosition;
|
|
||||||
if (trackdeltas)
|
|
||||||
{
|
|
||||||
// these are relative to screen coordinates, but that's not terribly important
|
|
||||||
FloatDeltas["WMouse X"] += Math.Abs(P.X - FloatValues["WMouse X"]) * 50;
|
|
||||||
FloatDeltas["WMouse Y"] += Math.Abs(P.Y - FloatValues["WMouse Y"]) * 50;
|
|
||||||
}
|
|
||||||
// coordinate translation happens later
|
|
||||||
FloatValues["WMouse X"] = P.X;
|
|
||||||
FloatValues["WMouse Y"] = P.Y;
|
|
||||||
|
|
||||||
var B = System.Windows.Forms.Control.MouseButtons;
|
|
||||||
HandleButton("WMouse L", (B & System.Windows.Forms.MouseButtons.Left) != 0);
|
|
||||||
HandleButton("WMouse C", (B & System.Windows.Forms.MouseButtons.Middle) != 0);
|
|
||||||
HandleButton("WMouse R", (B & System.Windows.Forms.MouseButtons.Right) != 0);
|
|
||||||
HandleButton("WMouse 1", (B & System.Windows.Forms.MouseButtons.XButton1) != 0);
|
|
||||||
HandleButton("WMouse 2", (B & System.Windows.Forms.MouseButtons.XButton2) != 0);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//dont do this: for now, it will interfere with the virtualpad. dont do something similar for the mouse position either
|
|
||||||
//unpress all buttons
|
|
||||||
//HandleButton("WMouse L", false);
|
|
||||||
//HandleButton("WMouse C", false);
|
|
||||||
//HandleButton("WMouse R", false);
|
|
||||||
//HandleButton("WMouse 1", false);
|
|
||||||
//HandleButton("WMouse 2", false);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
bool swallow = !GlobalWin.MainForm.AllowInput;
|
|
||||||
|
|
||||||
foreach (var ie in _NewEvents)
|
|
||||||
{
|
|
||||||
//events are swallowed in some cases:
|
|
||||||
if (ie.EventType == InputEventType.Press && swallow)
|
|
||||||
{ }
|
|
||||||
else
|
|
||||||
EnqueueEvent(ie);
|
|
||||||
}
|
|
||||||
} //lock(this)
|
|
||||||
|
|
||||||
//arbitrary selection of polling frequency:
|
|
||||||
Thread.Sleep(10);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public void StartListeningForFloatEvents()
|
|
||||||
{
|
|
||||||
lock (FloatValues)
|
|
||||||
{
|
|
||||||
FloatDeltas.Clear();
|
|
||||||
trackdeltas = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string GetNextFloatEvent()
|
|
||||||
{
|
|
||||||
lock (FloatValues)
|
|
||||||
{
|
|
||||||
foreach (var kvp in FloatDeltas)
|
|
||||||
{
|
|
||||||
// need to wiggle the stick a bit
|
|
||||||
if (kvp.Value >= 20000.0f)
|
|
||||||
return kvp.Key;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void StopListeningForFloatEvents()
|
|
||||||
{
|
|
||||||
lock (FloatValues)
|
|
||||||
{
|
|
||||||
trackdeltas = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Update()
|
|
||||||
{
|
|
||||||
//TODO - for some reason, we may want to control when the next event processing step happens
|
|
||||||
//so i will leave this method here for now..
|
|
||||||
}
|
|
||||||
|
|
||||||
//returns the next Press event, if available. should be useful
|
|
||||||
public string GetNextBindEvent()
|
|
||||||
{
|
|
||||||
//this whole process is intimately involved with the data structures, which can conflict with the input thread.
|
|
||||||
lock (this)
|
|
||||||
{
|
|
||||||
if (InputEvents.Count == 0) return null;
|
|
||||||
if (!GlobalWin.MainForm.AllowInput) return null;
|
|
||||||
|
|
||||||
//we only listen to releases for input binding, because we need to distinguish releases of pure modifierkeys from modified keys
|
|
||||||
//if you just pressed ctrl, wanting to bind ctrl, we'd see: pressed:ctrl, unpressed:ctrl
|
|
||||||
//if you just pressed ctrl+c, wanting to bind ctrl+c, we'd see: pressed:ctrl, pressed:ctrl+c, unpressed:ctrl+c, unpressed:ctrl
|
|
||||||
//so its the first unpress we need to listen for
|
|
||||||
|
|
||||||
while (InputEvents.Count != 0)
|
|
||||||
{
|
|
||||||
var ie = DequeueEvent();
|
|
||||||
|
|
||||||
//as a special perk, we'll accept escape immediately
|
|
||||||
if (ie.EventType == InputEventType.Press && ie.LogicalButton.Button == "Escape")
|
|
||||||
goto ACCEPT;
|
|
||||||
|
|
||||||
if (ie.EventType == InputEventType.Press) continue;
|
|
||||||
|
|
||||||
ACCEPT:
|
|
||||||
Console.WriteLine("Bind Event: {0} ", ie);
|
|
||||||
|
|
||||||
foreach (var kvp in LastState)
|
|
||||||
if (kvp.Value)
|
|
||||||
{
|
|
||||||
Console.WriteLine("Unpressing " + kvp.Key);
|
|
||||||
UnpressState[kvp.Key] = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
InputEvents.Clear();
|
|
||||||
|
|
||||||
return ie.LogicalButton.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//controls whether modifier keys will be ignored as key press events
|
|
||||||
//this should be used by hotkey binders, but we may want modifier key events
|
|
||||||
//to get triggered in the main form
|
|
||||||
public bool EnableIgnoreModifiers = false;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,132 +0,0 @@
|
||||||
using System.Collections.Generic;
|
|
||||||
using SlimDX;
|
|
||||||
using SlimDX.DirectInput;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace BizHawk.Client.MultiHawk
|
|
||||||
{
|
|
||||||
public static class KeyInput
|
|
||||||
{
|
|
||||||
private static DirectInput dinput;
|
|
||||||
private static Keyboard keyboard;
|
|
||||||
private static KeyboardState state = new KeyboardState();
|
|
||||||
|
|
||||||
public static void Initialize(IntPtr parent)
|
|
||||||
{
|
|
||||||
if (dinput == null)
|
|
||||||
dinput = new DirectInput();
|
|
||||||
|
|
||||||
if (keyboard == null || keyboard.Disposed)
|
|
||||||
keyboard = new Keyboard(dinput);
|
|
||||||
keyboard.SetCooperativeLevel(parent, CooperativeLevel.Background | CooperativeLevel.Nonexclusive);
|
|
||||||
keyboard.Properties.BufferSize = 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
static List<KeyEvent> EmptyList = new List<KeyEvent>();
|
|
||||||
static List<KeyEvent> EventList = new List<KeyEvent>();
|
|
||||||
|
|
||||||
public static IEnumerable<KeyEvent> Update()
|
|
||||||
{
|
|
||||||
EventList.Clear();
|
|
||||||
|
|
||||||
if (keyboard.Acquire().IsFailure)
|
|
||||||
return EmptyList;
|
|
||||||
if (keyboard.Poll().IsFailure)
|
|
||||||
return EmptyList;
|
|
||||||
|
|
||||||
for (; ; )
|
|
||||||
{
|
|
||||||
var events = keyboard.GetBufferedData();
|
|
||||||
if (Result.Last.IsFailure)
|
|
||||||
return EventList;
|
|
||||||
if (events.Count == 0)
|
|
||||||
break;
|
|
||||||
foreach (var e in events)
|
|
||||||
{
|
|
||||||
foreach (var k in e.PressedKeys)
|
|
||||||
EventList.Add(new KeyEvent { Key = k, Pressed = true });
|
|
||||||
foreach (var k in e.ReleasedKeys)
|
|
||||||
EventList.Add(new KeyEvent { Key = k, Pressed = false });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return EventList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public struct KeyEvent
|
|
||||||
{
|
|
||||||
public Key Key;
|
|
||||||
public bool Pressed;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public static bool IsPressed(Key key)
|
|
||||||
{
|
|
||||||
if (state.IsPressed(key))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if (key == Key.LeftShift && state.IsPressed(Key.RightShift))
|
|
||||||
return true;
|
|
||||||
if (key == Key.LeftControl && state.IsPressed(Key.RightControl))
|
|
||||||
return true;
|
|
||||||
if (key == Key.LeftAlt && state.IsPressed(Key.RightAlt))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool ShiftModifier
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (state.IsPressed(Key.LeftShift)) return true;
|
|
||||||
if (state.IsPressed(Key.RightShift)) return true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool CtrlModifier
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (state.IsPressed(Key.LeftControl)) return true;
|
|
||||||
if (state.IsPressed(Key.RightControl)) return true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool AltModifier
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (state.IsPressed(Key.LeftAlt)) return true;
|
|
||||||
if (state.IsPressed(Key.RightAlt)) return true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Input.ModifierKey GetModifierKeysAsKeys()
|
|
||||||
{
|
|
||||||
Input.ModifierKey ret = Input.ModifierKey.None;
|
|
||||||
if (ShiftModifier) ret |= Input.ModifierKey.Shift;
|
|
||||||
if (CtrlModifier) ret |= Input.ModifierKey.Control;
|
|
||||||
if (AltModifier) ret |= Input.ModifierKey.Alt;
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
internal static class KeyExtensions
|
|
||||||
{
|
|
||||||
public static bool IsModifier(this Key key)
|
|
||||||
{
|
|
||||||
if (key == Key.LeftShift) return true;
|
|
||||||
if (key == Key.RightShift) return true;
|
|
||||||
if (key == Key.LeftControl) return true;
|
|
||||||
if (key == Key.RightControl) return true;
|
|
||||||
if (key == Key.LeftAlt) return true;
|
|
||||||
if (key == Key.RightAlt) return true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,121 +0,0 @@
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
using BizHawk.Emulation.Common;
|
|
||||||
using BizHawk.Client.Common.InputAdapterExtensions;
|
|
||||||
|
|
||||||
using BizHawk.Client.Common;
|
|
||||||
|
|
||||||
namespace BizHawk.Client.MultiHawk
|
|
||||||
{
|
|
||||||
public class InputManager
|
|
||||||
{
|
|
||||||
Mainform _mainForm;
|
|
||||||
|
|
||||||
public InputManager(Mainform mainForm)
|
|
||||||
{
|
|
||||||
_mainForm = mainForm;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RewireInputChain()
|
|
||||||
{
|
|
||||||
Global.ControllerInputCoalescer.Clear();
|
|
||||||
Global.ControllerInputCoalescer.Definition = Global.ActiveController.Definition;
|
|
||||||
|
|
||||||
// TODO?
|
|
||||||
//Global.UD_LR_ControllerAdapter.Source = Global.ActiveController.Or(Global.AutoFireController);
|
|
||||||
Global.UD_LR_ControllerAdapter.Source = Global.ActiveController;
|
|
||||||
|
|
||||||
Global.StickyXORAdapter.Source = Global.UD_LR_ControllerAdapter;
|
|
||||||
|
|
||||||
// TODO?
|
|
||||||
//Global.AutofireStickyXORAdapter.Source = Global.StickyXORAdapter;
|
|
||||||
|
|
||||||
//Global.MultitrackRewiringAdapter.Source = Global.AutofireStickyXORAdapter;
|
|
||||||
|
|
||||||
Global.MultitrackRewiringAdapter.Source = Global.StickyXORAdapter;
|
|
||||||
Global.MovieInputSourceAdapter.Source = Global.MultitrackRewiringAdapter;
|
|
||||||
Global.ControllerOutput.Source = Global.MovieOutputHardpoint;
|
|
||||||
|
|
||||||
Global.MovieSession.MovieControllerAdapter.Definition = Global.MovieInputSourceAdapter.Definition;
|
|
||||||
|
|
||||||
// connect the movie session before MovieOutputHardpoint if it is doing anything
|
|
||||||
// otherwise connect the MovieInputSourceAdapter to it, effectively bypassing the movie session
|
|
||||||
if (Global.MovieSession != null)
|
|
||||||
{
|
|
||||||
Global.MovieOutputHardpoint.Source = Global.MovieSession.MovieControllerAdapter;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Global.MovieOutputHardpoint.Source = Global.MovieInputSourceAdapter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SyncControls()
|
|
||||||
{
|
|
||||||
var def = _mainForm.EmulatorWindows.First().Emulator.ControllerDefinition;
|
|
||||||
|
|
||||||
Global.ActiveController = BindToDefinition(def, Global.Config.AllTrollers, Global.Config.AllTrollersAnalog);
|
|
||||||
// TODO?
|
|
||||||
//Global.AutoFireController = BindToDefinitionAF(def, Global.Config.AllTrollersAutoFire);
|
|
||||||
|
|
||||||
// allow propogating controls that are in the current controller definition but not in the prebaked one
|
|
||||||
// these two lines shouldn't be required anymore under the new system?
|
|
||||||
Global.ActiveController.ForceType(new ControllerDefinition(def));
|
|
||||||
Global.ClickyVirtualPadController.Definition = new ControllerDefinition(def);
|
|
||||||
RewireInputChain();
|
|
||||||
}
|
|
||||||
|
|
||||||
private Controller BindToDefinition(ControllerDefinition def, IDictionary<string, Dictionary<string, string>> allbinds, IDictionary<string, Dictionary<string, Config.AnalogBind>> analogbinds)
|
|
||||||
{
|
|
||||||
var ret = new Controller(def);
|
|
||||||
Dictionary<string, string> binds;
|
|
||||||
if (allbinds.TryGetValue(def.Name, out binds))
|
|
||||||
{
|
|
||||||
foreach (var cbutton in def.BoolButtons)
|
|
||||||
{
|
|
||||||
string bind;
|
|
||||||
if (binds.TryGetValue(cbutton, out bind))
|
|
||||||
{
|
|
||||||
ret.BindMulti(cbutton, bind);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Dictionary<string, Config.AnalogBind> abinds;
|
|
||||||
if (analogbinds.TryGetValue(def.Name, out abinds))
|
|
||||||
{
|
|
||||||
foreach (var cbutton in def.FloatControls)
|
|
||||||
{
|
|
||||||
Config.AnalogBind bind;
|
|
||||||
if (abinds.TryGetValue(cbutton, out bind))
|
|
||||||
{
|
|
||||||
ret.BindFloat(cbutton, bind);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO?
|
|
||||||
//private AutofireController BindToDefinitionAF(ControllerDefinition def, IDictionary<string, Dictionary<string, string>> allbinds)
|
|
||||||
//{
|
|
||||||
// var ret = new AutofireController(def);
|
|
||||||
// Dictionary<string, string> binds;
|
|
||||||
// if (allbinds.TryGetValue(def.Name, out binds))
|
|
||||||
// {
|
|
||||||
// foreach (var cbutton in def.BoolButtons)
|
|
||||||
// {
|
|
||||||
// string bind;
|
|
||||||
// if (binds.TryGetValue(cbutton, out bind))
|
|
||||||
// {
|
|
||||||
// ret.BindMulti(cbutton, bind);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// return ret;
|
|
||||||
//}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,548 +0,0 @@
|
||||||
namespace BizHawk.Client.MultiHawk
|
|
||||||
{
|
|
||||||
partial class Mainform
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Required designer variable.
|
|
||||||
/// </summary>
|
|
||||||
private System.ComponentModel.IContainer components = null;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Clean up any resources being used.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
|
||||||
protected override void Dispose(bool disposing)
|
|
||||||
{
|
|
||||||
if (disposing && (components != null))
|
|
||||||
{
|
|
||||||
components.Dispose();
|
|
||||||
}
|
|
||||||
base.Dispose(disposing);
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Windows Form Designer generated code
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Required method for Designer support - do not modify
|
|
||||||
/// the contents of this method with the code editor.
|
|
||||||
/// </summary>
|
|
||||||
private void InitializeComponent()
|
|
||||||
{
|
|
||||||
this.components = new System.ComponentModel.Container();
|
|
||||||
this.MainformMenu = new MenuStripEx();
|
|
||||||
this.FileSubMenu = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.NewSessionMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.OpenSessionMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.SaveSessionMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.SaveSessionAsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.RecentSessionSubMenu = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
|
|
||||||
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
|
|
||||||
this.OpenRomMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.RecentRomSubMenu = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
|
||||||
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
|
|
||||||
this.RebootCoresMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
|
|
||||||
this.ExitMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.ViewSubMenu = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this._1xMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this._2xMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this._3xMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this._4xMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.MovieSubMenu = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.RecordMovieMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.PlayMovieMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.StopMovieMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.RestartMovieMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.RecentMovieSubMenu = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
|
|
||||||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
|
||||||
this.ToggleReadonlyMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.configToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.controllerConfigToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.hotkeyConfigToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
|
|
||||||
this.saveConfigToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.WorkspacePanel = new System.Windows.Forms.Panel();
|
|
||||||
this.MainStatusBar = new System.Windows.Forms.StatusStrip();
|
|
||||||
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
|
|
||||||
this.FameStatusBarLabel = new System.Windows.Forms.ToolStripStatusLabel();
|
|
||||||
this.PlayRecordStatusButton = new System.Windows.Forms.ToolStripDropDownButton();
|
|
||||||
this.StatusBarMessageLabel = new System.Windows.Forms.ToolStripStatusLabel();
|
|
||||||
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
|
||||||
this.RecordMovieContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.PlayMovieContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.LoadLastMovieContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.StopMovieContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.RestartMovieContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.MainformMenu.SuspendLayout();
|
|
||||||
this.WorkspacePanel.SuspendLayout();
|
|
||||||
this.MainStatusBar.SuspendLayout();
|
|
||||||
this.contextMenuStrip1.SuspendLayout();
|
|
||||||
this.SuspendLayout();
|
|
||||||
//
|
|
||||||
// MainformMenu
|
|
||||||
//
|
|
||||||
this.MainformMenu.ClickThrough = true;
|
|
||||||
this.MainformMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
|
||||||
this.FileSubMenu,
|
|
||||||
this.ViewSubMenu,
|
|
||||||
this.MovieSubMenu,
|
|
||||||
this.configToolStripMenuItem});
|
|
||||||
this.MainformMenu.Location = new System.Drawing.Point(0, 0);
|
|
||||||
this.MainformMenu.Name = "MainformMenu";
|
|
||||||
this.MainformMenu.Size = new System.Drawing.Size(655, 24);
|
|
||||||
this.MainformMenu.TabIndex = 0;
|
|
||||||
this.MainformMenu.Text = "menuStrip1";
|
|
||||||
//
|
|
||||||
// FileSubMenu
|
|
||||||
//
|
|
||||||
this.FileSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
|
||||||
this.NewSessionMenuItem,
|
|
||||||
this.OpenSessionMenuItem,
|
|
||||||
this.SaveSessionMenuItem,
|
|
||||||
this.SaveSessionAsMenuItem,
|
|
||||||
this.RecentSessionSubMenu,
|
|
||||||
this.toolStripSeparator7,
|
|
||||||
this.OpenRomMenuItem,
|
|
||||||
this.RecentRomSubMenu,
|
|
||||||
this.toolStripSeparator5,
|
|
||||||
this.RebootCoresMenuItem,
|
|
||||||
this.toolStripSeparator3,
|
|
||||||
this.ExitMenuItem});
|
|
||||||
this.FileSubMenu.Name = "FileSubMenu";
|
|
||||||
this.FileSubMenu.Size = new System.Drawing.Size(37, 20);
|
|
||||||
this.FileSubMenu.Text = "&File";
|
|
||||||
this.FileSubMenu.DropDownOpened += new System.EventHandler(this.FileSubMenu_DropDownOpened);
|
|
||||||
//
|
|
||||||
// NewSessionMenuItem
|
|
||||||
//
|
|
||||||
this.NewSessionMenuItem.Name = "NewSessionMenuItem";
|
|
||||||
this.NewSessionMenuItem.Size = new System.Drawing.Size(165, 22);
|
|
||||||
this.NewSessionMenuItem.Text = "&New Session";
|
|
||||||
this.NewSessionMenuItem.Click += new System.EventHandler(this.NewSessionMenuItem_Click);
|
|
||||||
//
|
|
||||||
// OpenSessionMenuItem
|
|
||||||
//
|
|
||||||
this.OpenSessionMenuItem.Name = "OpenSessionMenuItem";
|
|
||||||
this.OpenSessionMenuItem.Size = new System.Drawing.Size(165, 22);
|
|
||||||
this.OpenSessionMenuItem.Text = "&Open Session";
|
|
||||||
this.OpenSessionMenuItem.Click += new System.EventHandler(this.OpenSessionMenuItem_Click);
|
|
||||||
//
|
|
||||||
// SaveSessionMenuItem
|
|
||||||
//
|
|
||||||
this.SaveSessionMenuItem.Name = "SaveSessionMenuItem";
|
|
||||||
this.SaveSessionMenuItem.Size = new System.Drawing.Size(165, 22);
|
|
||||||
this.SaveSessionMenuItem.Text = "&Save Session";
|
|
||||||
this.SaveSessionMenuItem.Click += new System.EventHandler(this.SaveSessionMenuItem_Click);
|
|
||||||
//
|
|
||||||
// SaveSessionAsMenuItem
|
|
||||||
//
|
|
||||||
this.SaveSessionAsMenuItem.Name = "SaveSessionAsMenuItem";
|
|
||||||
this.SaveSessionAsMenuItem.Size = new System.Drawing.Size(165, 22);
|
|
||||||
this.SaveSessionAsMenuItem.Text = "Save Session &As...";
|
|
||||||
this.SaveSessionAsMenuItem.Click += new System.EventHandler(this.SaveSessionAsMenuItem_Click);
|
|
||||||
//
|
|
||||||
// RecentSessionSubMenu
|
|
||||||
//
|
|
||||||
this.RecentSessionSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
|
||||||
this.toolStripSeparator6});
|
|
||||||
this.RecentSessionSubMenu.Name = "RecentSessionSubMenu";
|
|
||||||
this.RecentSessionSubMenu.Size = new System.Drawing.Size(165, 22);
|
|
||||||
this.RecentSessionSubMenu.Text = "Recent Session";
|
|
||||||
this.RecentSessionSubMenu.DropDownOpened += new System.EventHandler(this.RecentSessionSubMenu_DropDownOpened);
|
|
||||||
//
|
|
||||||
// toolStripSeparator6
|
|
||||||
//
|
|
||||||
this.toolStripSeparator6.Name = "toolStripSeparator6";
|
|
||||||
this.toolStripSeparator6.Size = new System.Drawing.Size(57, 6);
|
|
||||||
//
|
|
||||||
// toolStripSeparator7
|
|
||||||
//
|
|
||||||
this.toolStripSeparator7.Name = "toolStripSeparator7";
|
|
||||||
this.toolStripSeparator7.Size = new System.Drawing.Size(162, 6);
|
|
||||||
//
|
|
||||||
// OpenRomMenuItem
|
|
||||||
//
|
|
||||||
this.OpenRomMenuItem.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.OpenFile;
|
|
||||||
this.OpenRomMenuItem.Name = "OpenRomMenuItem";
|
|
||||||
this.OpenRomMenuItem.Size = new System.Drawing.Size(165, 22);
|
|
||||||
this.OpenRomMenuItem.Text = "Open ROM";
|
|
||||||
this.OpenRomMenuItem.Click += new System.EventHandler(this.OpenRomMenuItem_Click);
|
|
||||||
//
|
|
||||||
// RecentRomSubMenu
|
|
||||||
//
|
|
||||||
this.RecentRomSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
|
||||||
this.toolStripSeparator1});
|
|
||||||
this.RecentRomSubMenu.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.Recent;
|
|
||||||
this.RecentRomSubMenu.Name = "RecentRomSubMenu";
|
|
||||||
this.RecentRomSubMenu.Size = new System.Drawing.Size(165, 22);
|
|
||||||
this.RecentRomSubMenu.Text = "Recent";
|
|
||||||
this.RecentRomSubMenu.DropDownOpened += new System.EventHandler(this.RecentRomSubMenu_DropDownOpened);
|
|
||||||
//
|
|
||||||
// toolStripSeparator1
|
|
||||||
//
|
|
||||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
|
||||||
this.toolStripSeparator1.Size = new System.Drawing.Size(57, 6);
|
|
||||||
//
|
|
||||||
// toolStripSeparator5
|
|
||||||
//
|
|
||||||
this.toolStripSeparator5.Name = "toolStripSeparator5";
|
|
||||||
this.toolStripSeparator5.Size = new System.Drawing.Size(162, 6);
|
|
||||||
//
|
|
||||||
// RebootCoresMenuItem
|
|
||||||
//
|
|
||||||
this.RebootCoresMenuItem.Name = "RebootCoresMenuItem";
|
|
||||||
this.RebootCoresMenuItem.Size = new System.Drawing.Size(165, 22);
|
|
||||||
this.RebootCoresMenuItem.Text = "Reboot Cores";
|
|
||||||
this.RebootCoresMenuItem.Click += new System.EventHandler(this.RebootCoresMenuItem_Click);
|
|
||||||
//
|
|
||||||
// toolStripSeparator3
|
|
||||||
//
|
|
||||||
this.toolStripSeparator3.Name = "toolStripSeparator3";
|
|
||||||
this.toolStripSeparator3.Size = new System.Drawing.Size(162, 6);
|
|
||||||
//
|
|
||||||
// ExitMenuItem
|
|
||||||
//
|
|
||||||
this.ExitMenuItem.Name = "ExitMenuItem";
|
|
||||||
this.ExitMenuItem.ShortcutKeyDisplayString = "Alt+F4";
|
|
||||||
this.ExitMenuItem.Size = new System.Drawing.Size(165, 22);
|
|
||||||
this.ExitMenuItem.Text = "E&xit";
|
|
||||||
this.ExitMenuItem.Click += new System.EventHandler(this.ExitMenuItem_Click);
|
|
||||||
//
|
|
||||||
// ViewSubMenu
|
|
||||||
//
|
|
||||||
this.ViewSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
|
||||||
this._1xMenuItem,
|
|
||||||
this._2xMenuItem,
|
|
||||||
this._3xMenuItem,
|
|
||||||
this._4xMenuItem});
|
|
||||||
this.ViewSubMenu.Enabled = false;
|
|
||||||
this.ViewSubMenu.Name = "ViewSubMenu";
|
|
||||||
this.ViewSubMenu.Size = new System.Drawing.Size(44, 20);
|
|
||||||
this.ViewSubMenu.Text = "&View";
|
|
||||||
this.ViewSubMenu.DropDownOpened += new System.EventHandler(this.ViewSubMenu_DropDownOpened);
|
|
||||||
//
|
|
||||||
// _1xMenuItem
|
|
||||||
//
|
|
||||||
this._1xMenuItem.Name = "_1xMenuItem";
|
|
||||||
this._1xMenuItem.Size = new System.Drawing.Size(85, 22);
|
|
||||||
this._1xMenuItem.Text = "&1x";
|
|
||||||
this._1xMenuItem.Click += new System.EventHandler(this._1xMenuItem_Click);
|
|
||||||
//
|
|
||||||
// _2xMenuItem
|
|
||||||
//
|
|
||||||
this._2xMenuItem.Name = "_2xMenuItem";
|
|
||||||
this._2xMenuItem.Size = new System.Drawing.Size(85, 22);
|
|
||||||
this._2xMenuItem.Text = "&2x";
|
|
||||||
this._2xMenuItem.Click += new System.EventHandler(this._2xMenuItem_Click);
|
|
||||||
//
|
|
||||||
// _3xMenuItem
|
|
||||||
//
|
|
||||||
this._3xMenuItem.Name = "_3xMenuItem";
|
|
||||||
this._3xMenuItem.Size = new System.Drawing.Size(85, 22);
|
|
||||||
this._3xMenuItem.Text = "&3x";
|
|
||||||
this._3xMenuItem.Click += new System.EventHandler(this._3xMenuItem_Click);
|
|
||||||
//
|
|
||||||
// _4xMenuItem
|
|
||||||
//
|
|
||||||
this._4xMenuItem.Name = "_4xMenuItem";
|
|
||||||
this._4xMenuItem.Size = new System.Drawing.Size(85, 22);
|
|
||||||
this._4xMenuItem.Text = "&4x";
|
|
||||||
this._4xMenuItem.Click += new System.EventHandler(this._4xMenuItem_Click);
|
|
||||||
//
|
|
||||||
// MovieSubMenu
|
|
||||||
//
|
|
||||||
this.MovieSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
|
||||||
this.RecordMovieMenuItem,
|
|
||||||
this.PlayMovieMenuItem,
|
|
||||||
this.StopMovieMenuItem,
|
|
||||||
this.RestartMovieMenuItem,
|
|
||||||
this.RecentMovieSubMenu,
|
|
||||||
this.toolStripSeparator2,
|
|
||||||
this.ToggleReadonlyMenuItem});
|
|
||||||
this.MovieSubMenu.Name = "MovieSubMenu";
|
|
||||||
this.MovieSubMenu.Size = new System.Drawing.Size(52, 20);
|
|
||||||
this.MovieSubMenu.Text = "&Movie";
|
|
||||||
this.MovieSubMenu.DropDownOpened += new System.EventHandler(this.MovieSubMenu_DropDownOpened);
|
|
||||||
//
|
|
||||||
// RecordMovieMenuItem
|
|
||||||
//
|
|
||||||
this.RecordMovieMenuItem.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.RecordHS;
|
|
||||||
this.RecordMovieMenuItem.Name = "RecordMovieMenuItem";
|
|
||||||
this.RecordMovieMenuItem.Size = new System.Drawing.Size(168, 22);
|
|
||||||
this.RecordMovieMenuItem.Text = "Record Movie";
|
|
||||||
this.RecordMovieMenuItem.Click += new System.EventHandler(this.RecordMovieMenuItem_Click);
|
|
||||||
//
|
|
||||||
// PlayMovieMenuItem
|
|
||||||
//
|
|
||||||
this.PlayMovieMenuItem.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.Play;
|
|
||||||
this.PlayMovieMenuItem.Name = "PlayMovieMenuItem";
|
|
||||||
this.PlayMovieMenuItem.Size = new System.Drawing.Size(168, 22);
|
|
||||||
this.PlayMovieMenuItem.Text = "Play Movie";
|
|
||||||
this.PlayMovieMenuItem.Click += new System.EventHandler(this.PlayMovieMenuItem_Click);
|
|
||||||
//
|
|
||||||
// StopMovieMenuItem
|
|
||||||
//
|
|
||||||
this.StopMovieMenuItem.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.Stop;
|
|
||||||
this.StopMovieMenuItem.Name = "StopMovieMenuItem";
|
|
||||||
this.StopMovieMenuItem.Size = new System.Drawing.Size(168, 22);
|
|
||||||
this.StopMovieMenuItem.Text = "&Stop Movie";
|
|
||||||
this.StopMovieMenuItem.Click += new System.EventHandler(this.StopMovieMenuItem_Click);
|
|
||||||
//
|
|
||||||
// RestartMovieMenuItem
|
|
||||||
//
|
|
||||||
this.RestartMovieMenuItem.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.restart;
|
|
||||||
this.RestartMovieMenuItem.Name = "RestartMovieMenuItem";
|
|
||||||
this.RestartMovieMenuItem.Size = new System.Drawing.Size(168, 22);
|
|
||||||
this.RestartMovieMenuItem.Text = "Restart Movie";
|
|
||||||
this.RestartMovieMenuItem.Click += new System.EventHandler(this.RestartMovieMenuItem_Click);
|
|
||||||
//
|
|
||||||
// RecentMovieSubMenu
|
|
||||||
//
|
|
||||||
this.RecentMovieSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
|
||||||
this.toolStripSeparator8});
|
|
||||||
this.RecentMovieSubMenu.Name = "RecentMovieSubMenu";
|
|
||||||
this.RecentMovieSubMenu.Size = new System.Drawing.Size(168, 22);
|
|
||||||
this.RecentMovieSubMenu.Text = "Recent";
|
|
||||||
this.RecentMovieSubMenu.DropDownOpened += new System.EventHandler(this.RecentMovieSubMenu_DropDownOpened);
|
|
||||||
//
|
|
||||||
// toolStripSeparator8
|
|
||||||
//
|
|
||||||
this.toolStripSeparator8.Name = "toolStripSeparator8";
|
|
||||||
this.toolStripSeparator8.Size = new System.Drawing.Size(57, 6);
|
|
||||||
//
|
|
||||||
// toolStripSeparator2
|
|
||||||
//
|
|
||||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
|
||||||
this.toolStripSeparator2.Size = new System.Drawing.Size(165, 6);
|
|
||||||
//
|
|
||||||
// ToggleReadonlyMenuItem
|
|
||||||
//
|
|
||||||
this.ToggleReadonlyMenuItem.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.ReadOnly;
|
|
||||||
this.ToggleReadonlyMenuItem.Name = "ToggleReadonlyMenuItem";
|
|
||||||
this.ToggleReadonlyMenuItem.Size = new System.Drawing.Size(168, 22);
|
|
||||||
this.ToggleReadonlyMenuItem.Text = "Toggle Read-only";
|
|
||||||
this.ToggleReadonlyMenuItem.Click += new System.EventHandler(this.ToggleReadonlyMenuItem_Click);
|
|
||||||
//
|
|
||||||
// configToolStripMenuItem
|
|
||||||
//
|
|
||||||
this.configToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
|
||||||
this.controllerConfigToolStripMenuItem,
|
|
||||||
this.hotkeyConfigToolStripMenuItem,
|
|
||||||
this.toolStripSeparator4,
|
|
||||||
this.saveConfigToolStripMenuItem});
|
|
||||||
this.configToolStripMenuItem.Name = "configToolStripMenuItem";
|
|
||||||
this.configToolStripMenuItem.Size = new System.Drawing.Size(55, 20);
|
|
||||||
this.configToolStripMenuItem.Text = "&Config";
|
|
||||||
//
|
|
||||||
// controllerConfigToolStripMenuItem
|
|
||||||
//
|
|
||||||
this.controllerConfigToolStripMenuItem.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.GameController;
|
|
||||||
this.controllerConfigToolStripMenuItem.Name = "controllerConfigToolStripMenuItem";
|
|
||||||
this.controllerConfigToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
|
|
||||||
this.controllerConfigToolStripMenuItem.Text = "Controller Config";
|
|
||||||
this.controllerConfigToolStripMenuItem.Click += new System.EventHandler(this.controllerConfigToolStripMenuItem_Click);
|
|
||||||
//
|
|
||||||
// hotkeyConfigToolStripMenuItem
|
|
||||||
//
|
|
||||||
this.hotkeyConfigToolStripMenuItem.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.HotKeys;
|
|
||||||
this.hotkeyConfigToolStripMenuItem.Name = "hotkeyConfigToolStripMenuItem";
|
|
||||||
this.hotkeyConfigToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
|
|
||||||
this.hotkeyConfigToolStripMenuItem.Text = "Hotkey Config";
|
|
||||||
this.hotkeyConfigToolStripMenuItem.Click += new System.EventHandler(this.hotkeyConfigToolStripMenuItem_Click);
|
|
||||||
//
|
|
||||||
// toolStripSeparator4
|
|
||||||
//
|
|
||||||
this.toolStripSeparator4.Name = "toolStripSeparator4";
|
|
||||||
this.toolStripSeparator4.Size = new System.Drawing.Size(163, 6);
|
|
||||||
//
|
|
||||||
// saveConfigToolStripMenuItem
|
|
||||||
//
|
|
||||||
this.saveConfigToolStripMenuItem.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.Save;
|
|
||||||
this.saveConfigToolStripMenuItem.Name = "saveConfigToolStripMenuItem";
|
|
||||||
this.saveConfigToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
|
|
||||||
this.saveConfigToolStripMenuItem.Text = "Save Config";
|
|
||||||
this.saveConfigToolStripMenuItem.Click += new System.EventHandler(this.saveConfigToolStripMenuItem_Click);
|
|
||||||
//
|
|
||||||
// WorkspacePanel
|
|
||||||
//
|
|
||||||
this.WorkspacePanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
|
||||||
| System.Windows.Forms.AnchorStyles.Left)
|
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
|
||||||
this.WorkspacePanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
|
||||||
this.WorkspacePanel.Controls.Add(this.MainStatusBar);
|
|
||||||
this.WorkspacePanel.Location = new System.Drawing.Point(0, 25);
|
|
||||||
this.WorkspacePanel.Name = "WorkspacePanel";
|
|
||||||
this.WorkspacePanel.Size = new System.Drawing.Size(655, 405);
|
|
||||||
this.WorkspacePanel.TabIndex = 1;
|
|
||||||
//
|
|
||||||
// MainStatusBar
|
|
||||||
//
|
|
||||||
this.MainStatusBar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
|
||||||
this.toolStripStatusLabel1,
|
|
||||||
this.FameStatusBarLabel,
|
|
||||||
this.PlayRecordStatusButton,
|
|
||||||
this.StatusBarMessageLabel});
|
|
||||||
this.MainStatusBar.Location = new System.Drawing.Point(0, 379);
|
|
||||||
this.MainStatusBar.Name = "MainStatusBar";
|
|
||||||
this.MainStatusBar.Size = new System.Drawing.Size(651, 22);
|
|
||||||
this.MainStatusBar.TabIndex = 0;
|
|
||||||
this.MainStatusBar.Text = "statusStrip1";
|
|
||||||
//
|
|
||||||
// toolStripStatusLabel1
|
|
||||||
//
|
|
||||||
this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
|
|
||||||
this.toolStripStatusLabel1.Size = new System.Drawing.Size(46, 17);
|
|
||||||
this.toolStripStatusLabel1.Text = "Frame: ";
|
|
||||||
//
|
|
||||||
// FameStatusBarLabel
|
|
||||||
//
|
|
||||||
this.FameStatusBarLabel.Name = "FameStatusBarLabel";
|
|
||||||
this.FameStatusBarLabel.Size = new System.Drawing.Size(13, 17);
|
|
||||||
this.FameStatusBarLabel.Text = "0";
|
|
||||||
//
|
|
||||||
// PlayRecordStatusButton
|
|
||||||
//
|
|
||||||
this.PlayRecordStatusButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
|
||||||
this.PlayRecordStatusButton.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.Blank;
|
|
||||||
this.PlayRecordStatusButton.ImageTransparentColor = System.Drawing.Color.Magenta;
|
|
||||||
this.PlayRecordStatusButton.Name = "PlayRecordStatusButton";
|
|
||||||
this.PlayRecordStatusButton.Size = new System.Drawing.Size(29, 20);
|
|
||||||
this.PlayRecordStatusButton.Text = "No movie is active";
|
|
||||||
//
|
|
||||||
// StatusBarMessageLabel
|
|
||||||
//
|
|
||||||
this.StatusBarMessageLabel.Name = "StatusBarMessageLabel";
|
|
||||||
this.StatusBarMessageLabel.Size = new System.Drawing.Size(35, 17);
|
|
||||||
this.StatusBarMessageLabel.Text = "Hello";
|
|
||||||
//
|
|
||||||
// contextMenuStrip1
|
|
||||||
//
|
|
||||||
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
|
||||||
this.RecordMovieContextMenuItem,
|
|
||||||
this.PlayMovieContextMenuItem,
|
|
||||||
this.RestartMovieContextMenuItem,
|
|
||||||
this.StopMovieContextMenuItem,
|
|
||||||
this.LoadLastMovieContextMenuItem});
|
|
||||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
|
||||||
this.contextMenuStrip1.Size = new System.Drawing.Size(161, 114);
|
|
||||||
this.contextMenuStrip1.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip1_Opening);
|
|
||||||
//
|
|
||||||
// RecordMovieContextMenuItem
|
|
||||||
//
|
|
||||||
this.RecordMovieContextMenuItem.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.RecordHS;
|
|
||||||
this.RecordMovieContextMenuItem.Name = "RecordMovieContextMenuItem";
|
|
||||||
this.RecordMovieContextMenuItem.Size = new System.Drawing.Size(160, 22);
|
|
||||||
this.RecordMovieContextMenuItem.Text = "Record Movie";
|
|
||||||
this.RecordMovieContextMenuItem.Click += new System.EventHandler(this.RecordMovieMenuItem_Click);
|
|
||||||
//
|
|
||||||
// PlayMovieContextMenuItem
|
|
||||||
//
|
|
||||||
this.PlayMovieContextMenuItem.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.Play;
|
|
||||||
this.PlayMovieContextMenuItem.Name = "PlayMovieContextMenuItem";
|
|
||||||
this.PlayMovieContextMenuItem.Size = new System.Drawing.Size(160, 22);
|
|
||||||
this.PlayMovieContextMenuItem.Text = "Play Movie";
|
|
||||||
this.PlayMovieContextMenuItem.Click += new System.EventHandler(this.PlayMovieMenuItem_Click);
|
|
||||||
//
|
|
||||||
// LoadLastMovieContextMenuItem
|
|
||||||
//
|
|
||||||
this.LoadLastMovieContextMenuItem.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.Recent;
|
|
||||||
this.LoadLastMovieContextMenuItem.Name = "LoadLastMovieContextMenuItem";
|
|
||||||
this.LoadLastMovieContextMenuItem.Size = new System.Drawing.Size(160, 22);
|
|
||||||
this.LoadLastMovieContextMenuItem.Text = "Load Last Movie";
|
|
||||||
this.LoadLastMovieContextMenuItem.Click += new System.EventHandler(this.LoadLastMovieMenuItem_Click);
|
|
||||||
//
|
|
||||||
// StopMovieContextMenuItem
|
|
||||||
//
|
|
||||||
this.StopMovieContextMenuItem.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.Stop;
|
|
||||||
this.StopMovieContextMenuItem.Name = "StopMovieContextMenuItem";
|
|
||||||
this.StopMovieContextMenuItem.Size = new System.Drawing.Size(160, 22);
|
|
||||||
this.StopMovieContextMenuItem.Text = "Stop Movie";
|
|
||||||
this.StopMovieContextMenuItem.Click += new System.EventHandler(this.StopMovieMenuItem_Click);
|
|
||||||
//
|
|
||||||
// RestartMovieContextMenuItem
|
|
||||||
//
|
|
||||||
this.RestartMovieContextMenuItem.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.restart;
|
|
||||||
this.RestartMovieContextMenuItem.Name = "RestartMovieContextMenuItem";
|
|
||||||
this.RestartMovieContextMenuItem.Size = new System.Drawing.Size(160, 22);
|
|
||||||
this.RestartMovieContextMenuItem.Text = "Restart Movie";
|
|
||||||
this.RestartMovieContextMenuItem.Click += new System.EventHandler(this.RestartMovieMenuItem_Click);
|
|
||||||
//
|
|
||||||
// Mainform
|
|
||||||
//
|
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
|
||||||
this.ClientSize = new System.Drawing.Size(655, 431);
|
|
||||||
this.ContextMenuStrip = this.contextMenuStrip1;
|
|
||||||
this.Controls.Add(this.WorkspacePanel);
|
|
||||||
this.Controls.Add(this.MainformMenu);
|
|
||||||
this.MainMenuStrip = this.MainformMenu;
|
|
||||||
this.Name = "Mainform";
|
|
||||||
this.Text = "MultiHawk";
|
|
||||||
this.Load += new System.EventHandler(this.Mainform_Load);
|
|
||||||
this.MainformMenu.ResumeLayout(false);
|
|
||||||
this.MainformMenu.PerformLayout();
|
|
||||||
this.WorkspacePanel.ResumeLayout(false);
|
|
||||||
this.WorkspacePanel.PerformLayout();
|
|
||||||
this.MainStatusBar.ResumeLayout(false);
|
|
||||||
this.MainStatusBar.PerformLayout();
|
|
||||||
this.contextMenuStrip1.ResumeLayout(false);
|
|
||||||
this.ResumeLayout(false);
|
|
||||||
this.PerformLayout();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
private MenuStripEx MainformMenu;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem FileSubMenu;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem OpenRomMenuItem;
|
|
||||||
private System.Windows.Forms.Panel WorkspacePanel;
|
|
||||||
private System.Windows.Forms.StatusStrip MainStatusBar;
|
|
||||||
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
|
|
||||||
private System.Windows.Forms.ToolStripStatusLabel FameStatusBarLabel;
|
|
||||||
private System.Windows.Forms.ToolStripStatusLabel StatusBarMessageLabel;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem RecentRomSubMenu;
|
|
||||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem MovieSubMenu;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem RecordMovieMenuItem;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem PlayMovieMenuItem;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem StopMovieMenuItem;
|
|
||||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem ToggleReadonlyMenuItem;
|
|
||||||
private System.Windows.Forms.ToolStripDropDownButton PlayRecordStatusButton;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem configToolStripMenuItem;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem controllerConfigToolStripMenuItem;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem hotkeyConfigToolStripMenuItem;
|
|
||||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem ExitMenuItem;
|
|
||||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem saveConfigToolStripMenuItem;
|
|
||||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem RebootCoresMenuItem;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem OpenSessionMenuItem;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem SaveSessionMenuItem;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem RecentSessionSubMenu;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem NewSessionMenuItem;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem SaveSessionAsMenuItem;
|
|
||||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator6;
|
|
||||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator7;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem ViewSubMenu;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem _1xMenuItem;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem _2xMenuItem;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem _3xMenuItem;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem _4xMenuItem;
|
|
||||||
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem LoadLastMovieContextMenuItem;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem RecentMovieSubMenu;
|
|
||||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator8;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem RecordMovieContextMenuItem;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem StopMovieContextMenuItem;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem PlayMovieContextMenuItem;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem RestartMovieMenuItem;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem RestartMovieContextMenuItem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,132 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<root>
|
|
||||||
<!--
|
|
||||||
Microsoft ResX Schema
|
|
||||||
|
|
||||||
Version 2.0
|
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
|
||||||
that is mostly human readable. The generation and parsing of the
|
|
||||||
various data types are done through the TypeConverter classes
|
|
||||||
associated with the data types.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
|
||||||
<resheader name="version">2.0</resheader>
|
|
||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
|
||||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
|
||||||
</data>
|
|
||||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
|
||||||
<comment>This is a comment</comment>
|
|
||||||
</data>
|
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
|
||||||
name/value pairs.
|
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
|
||||||
text/value conversion through the TypeConverter architecture.
|
|
||||||
Classes that don't support this are serialized and stored with the
|
|
||||||
mimetype set.
|
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
|
||||||
read any of the formats listed below.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
|
||||||
value : The object must be serialized into a byte array
|
|
||||||
: using a System.ComponentModel.TypeConverter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
-->
|
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
|
||||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:choice maxOccurs="unbounded">
|
|
||||||
<xsd:element name="metadata">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="assembly">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:attribute name="alias" type="xsd:string" />
|
|
||||||
<xsd:attribute name="name" type="xsd:string" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="data">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="resheader">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:choice>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:schema>
|
|
||||||
<resheader name="resmimetype">
|
|
||||||
<value>text/microsoft-resx</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="version">
|
|
||||||
<value>2.0</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="reader">
|
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="writer">
|
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<metadata name="MainformMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
|
||||||
<value>17, 17</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="MainStatusBar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
|
||||||
<value>153, 17</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="MainStatusBar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
|
||||||
<value>153, 17</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
|
||||||
<value>283, 17</value>
|
|
||||||
</metadata>
|
|
||||||
</root>
|
|
|
@ -1,64 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Drawing;
|
|
||||||
using sd=System.Drawing;
|
|
||||||
using sysdrawingfont=System.Drawing.Font;
|
|
||||||
using sysdrawing2d=System.Drawing.Drawing2D;
|
|
||||||
using System.IO;
|
|
||||||
using System.Threading;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
#if WINDOWS
|
|
||||||
using SlimDX;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using BizHawk.Client.Common;
|
|
||||||
using BizHawk.Bizware.BizwareGL;
|
|
||||||
|
|
||||||
using OpenTK.Graphics.OpenGL;
|
|
||||||
|
|
||||||
namespace BizHawk.Client.MultiHawk
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Thinly wraps a BizwareGL.GraphicsControl for EmuHawk's needs
|
|
||||||
/// </summary>
|
|
||||||
public class PresentationPanel
|
|
||||||
{
|
|
||||||
public PresentationPanel(Form parent, IGL gl)
|
|
||||||
{
|
|
||||||
GL = gl;
|
|
||||||
|
|
||||||
GraphicsControl = new GraphicsControl(GL);
|
|
||||||
GraphicsControl.Dock = DockStyle.Fill;
|
|
||||||
GraphicsControl.BackColor = Color.Black;
|
|
||||||
|
|
||||||
//pass through these events to the form. we might need a more scalable solution for mousedown etc. for zapper and whatnot.
|
|
||||||
//http://stackoverflow.com/questions/547172/pass-through-mouse-events-to-parent-control (HTTRANSPARENT)
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
//GraphicsControl.MouseClick += (o, e) => GlobalWin.MainForm.MainForm_MouseClick(o, e);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IsDisposed = false;
|
|
||||||
public void Dispose()
|
|
||||||
{
|
|
||||||
if (IsDisposed) return;
|
|
||||||
IsDisposed = true;
|
|
||||||
GraphicsControl.Dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
//graphics resources
|
|
||||||
public IGL GL { get; set; }
|
|
||||||
public GraphicsControl GraphicsControl;
|
|
||||||
|
|
||||||
public Control Control { get { return GraphicsControl; } }
|
|
||||||
public static implicit operator Control(PresentationPanel self) { return self.GraphicsControl; }
|
|
||||||
|
|
||||||
public bool Resized { get; set; }
|
|
||||||
|
|
||||||
public Size NativeSize { get { return GraphicsControl.ClientSize; } }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public interface IBlitterFont { }
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,171 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.IO;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
#if WINDOWS
|
|
||||||
using SlimDX.DirectSound;
|
|
||||||
using Microsoft.VisualBasic.ApplicationServices;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using BizHawk.Common;
|
|
||||||
using BizHawk.Client.Common;
|
|
||||||
|
|
||||||
namespace BizHawk.Client.MultiHawk
|
|
||||||
{
|
|
||||||
static class Program
|
|
||||||
{
|
|
||||||
static Program()
|
|
||||||
{
|
|
||||||
//http://www.codeproject.com/Articles/310675/AppDomain-AssemblyResolve-Event-Tips
|
|
||||||
#if WINDOWS
|
|
||||||
// this will look in subdirectory "dll" to load pinvoked stuff
|
|
||||||
string dllDir = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "dll");
|
|
||||||
SetDllDirectory(dllDir);
|
|
||||||
|
|
||||||
//in case assembly resolution fails, such as if we moved them into the dll subdiretory, this event handler can reroute to them
|
|
||||||
AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve);
|
|
||||||
|
|
||||||
//but before we even try doing that, whack the MOTW from everything in that directory (thats a dll)
|
|
||||||
//otherwise, some people will have crashes at boot-up due to .net security disliking MOTW.
|
|
||||||
//some people are getting MOTW through a combination of browser used to download bizhawk, and program used to dearchive it
|
|
||||||
WhackAllMOTW(dllDir);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The main entry point for the application.
|
|
||||||
/// </summary>
|
|
||||||
[STAThread]
|
|
||||||
static void Main(string[] args)
|
|
||||||
{
|
|
||||||
SubMain(args);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//NoInlining should keep this code from getting jammed into Main() which would create dependencies on types which havent been setup by the resolver yet... or something like that
|
|
||||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
|
||||||
static void SubMain(string[] args)
|
|
||||||
{
|
|
||||||
Application.EnableVisualStyles();
|
|
||||||
Application.SetCompatibleTextRenderingDefault(false);
|
|
||||||
string iniPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "config.ini");
|
|
||||||
Global.Config = ConfigService.Load<Config>(iniPath);
|
|
||||||
Global.Config.ResolveDefaults();
|
|
||||||
HawkFile.ArchiveHandlerFactory = new SevenZipSharpArchiveHandler();
|
|
||||||
|
|
||||||
//super hacky! this needs to be done first. still not worth the trouble to make this system fully proper
|
|
||||||
for (int i = 0; i < args.Length; i++)
|
|
||||||
{
|
|
||||||
var arg = args[i].ToLower();
|
|
||||||
if (arg.StartsWith("--gdi"))
|
|
||||||
{
|
|
||||||
Global.Config.DispMethod = Config.EDispMethod.GdiPlus;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//WHY do we have to do this? some intel graphics drivers (ig7icd64.dll 10.18.10.3304 on an unknown chip on win8.1) are calling SetDllDirectory() for the process, which ruins stuff.
|
|
||||||
//The relevant initialization happened just before in "create IGL context".
|
|
||||||
//It isn't clear whether we need the earlier SetDllDirectory(), but I think we do.
|
|
||||||
//note: this is pasted instead of being put in a static method due to this initialization code being sensitive to things like that, and not wanting to cause it to break
|
|
||||||
//pasting should be safe (not affecting the jit order of things)
|
|
||||||
string dllDir = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "dll");
|
|
||||||
SetDllDirectory(dllDir);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
using (var mf = new Mainform(args))
|
|
||||||
{
|
|
||||||
var title = mf.Text;
|
|
||||||
mf.Show();
|
|
||||||
mf.Text = title;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
mf.ProgramRunLoop();
|
|
||||||
}
|
|
||||||
catch (Exception e) when (Global.MovieSession.Movie.IsActive)
|
|
||||||
{
|
|
||||||
var result = MessageBox.Show(
|
|
||||||
"EmuHawk has thrown a fatal exception and is about to close.\nA movie has been detected. Would you like to try to save?\n(Note: Depending on what caused this error, this may or may not succeed)",
|
|
||||||
"Fatal error: " + e.GetType().Name,
|
|
||||||
MessageBoxButtons.YesNo,
|
|
||||||
MessageBoxIcon.Exclamation
|
|
||||||
);
|
|
||||||
if (result == DialogResult.Yes)
|
|
||||||
{
|
|
||||||
Global.MovieSession.Movie.Save();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
string message = e.ToString();
|
|
||||||
if (e.InnerException != null)
|
|
||||||
{
|
|
||||||
message += "\n\nInner Exception:\n\n" + e.InnerException;
|
|
||||||
}
|
|
||||||
|
|
||||||
message += "\n\nStackTrace:\n" + e.StackTrace;
|
|
||||||
MessageBox.Show(message);
|
|
||||||
}
|
|
||||||
#if WINDOWS
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
GamePad.CloseAll();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
|
|
||||||
{
|
|
||||||
lock (AppDomain.CurrentDomain)
|
|
||||||
{
|
|
||||||
var asms = AppDomain.CurrentDomain.GetAssemblies();
|
|
||||||
foreach (var asm in asms)
|
|
||||||
if (asm.FullName == args.Name)
|
|
||||||
return asm;
|
|
||||||
|
|
||||||
//load missing assemblies by trying to find them in the dll directory
|
|
||||||
string dllname = new AssemblyName(args.Name).Name + ".dll";
|
|
||||||
string directory = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "dll");
|
|
||||||
string fname = Path.Combine(directory, dllname);
|
|
||||||
if (!File.Exists(fname)) return null;
|
|
||||||
//it is important that we use LoadFile here and not load from a byte array; otherwise mixed (managed/unamanged) assemblies can't load
|
|
||||||
return Assembly.LoadFile(fname);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//declared here instead of a more usual place to avoid dependencies on the more usual place
|
|
||||||
#if WINDOWS
|
|
||||||
[DllImport("kernel32.dll", SetLastError = true)]
|
|
||||||
static extern uint SetDllDirectory(string lpPathName);
|
|
||||||
|
|
||||||
[DllImport("kernel32.dll", EntryPoint = "DeleteFileW", SetLastError = true, CharSet = CharSet.Unicode, ExactSpelling = true)]
|
|
||||||
static extern bool DeleteFileW([MarshalAs(UnmanagedType.LPWStr)]string lpFileName);
|
|
||||||
static void RemoveMOTW(string path)
|
|
||||||
{
|
|
||||||
DeleteFileW(path + ":Zone.Identifier");
|
|
||||||
}
|
|
||||||
|
|
||||||
static void WhackAllMOTW(string dllDir)
|
|
||||||
{
|
|
||||||
var todo = new Queue<DirectoryInfo>(new[] { new DirectoryInfo(dllDir) });
|
|
||||||
while (todo.Count > 0)
|
|
||||||
{
|
|
||||||
var di = todo.Dequeue();
|
|
||||||
foreach (var disub in di.GetDirectories()) todo.Enqueue(disub);
|
|
||||||
foreach (var fi in di.GetFiles("*.dll"))
|
|
||||||
RemoveMOTW(fi.FullName);
|
|
||||||
foreach (var fi in di.GetFiles("*.exe"))
|
|
||||||
RemoveMOTW(fi.FullName);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,36 +0,0 @@
|
||||||
using System.Reflection;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
|
||||||
// set of attributes. Change these attribute values to modify the information
|
|
||||||
// associated with an assembly.
|
|
||||||
[assembly: AssemblyTitle("BizHawk.Client.MultiHawk")]
|
|
||||||
[assembly: AssemblyDescription("")]
|
|
||||||
[assembly: AssemblyConfiguration("")]
|
|
||||||
[assembly: AssemblyCompany("")]
|
|
||||||
[assembly: AssemblyProduct("BizHawk.Client.MultiHawk")]
|
|
||||||
[assembly: AssemblyCopyright("Copyright © 2015")]
|
|
||||||
[assembly: AssemblyTrademark("")]
|
|
||||||
[assembly: AssemblyCulture("")]
|
|
||||||
|
|
||||||
// Setting ComVisible to false makes the types in this assembly not visible
|
|
||||||
// to COM components. If you need to access a type in this assembly from
|
|
||||||
// COM, set the ComVisible attribute to true on that type.
|
|
||||||
[assembly: ComVisible(false)]
|
|
||||||
|
|
||||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
|
||||||
[assembly: Guid("fcf20c42-6452-46c7-bb88-bc9f5bd0ce71")]
|
|
||||||
|
|
||||||
// Version information for an assembly consists of the following four values:
|
|
||||||
//
|
|
||||||
// Major Version
|
|
||||||
// Minor Version
|
|
||||||
// Build Number
|
|
||||||
// Revision
|
|
||||||
//
|
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
|
||||||
// by using the '*' as shown below:
|
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
|
||||||
[assembly: AssemblyVersion("1.0.0.0")]
|
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
|
@ -1,293 +0,0 @@
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
// <auto-generated>
|
|
||||||
// This code was generated by a tool.
|
|
||||||
// Runtime Version:4.0.30319.34209
|
|
||||||
//
|
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
|
||||||
// the code is regenerated.
|
|
||||||
// </auto-generated>
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
namespace BizHawk.Client.MultiHawk.Properties {
|
|
||||||
using System;
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
|
||||||
/// </summary>
|
|
||||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
|
||||||
// class via a tool like ResGen or Visual Studio.
|
|
||||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
|
||||||
// with the /str option, or rebuild your VS project.
|
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
|
||||||
internal class Resources {
|
|
||||||
|
|
||||||
private static global::System.Resources.ResourceManager resourceMan;
|
|
||||||
|
|
||||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
|
||||||
|
|
||||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
|
||||||
internal Resources() {
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Returns the cached ResourceManager instance used by this class.
|
|
||||||
/// </summary>
|
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
|
||||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
|
||||||
get {
|
|
||||||
if (object.ReferenceEquals(resourceMan, null)) {
|
|
||||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("BizHawk.Client.MultiHawk.Properties.Resources", typeof(Resources).Assembly);
|
|
||||||
resourceMan = temp;
|
|
||||||
}
|
|
||||||
return resourceMan;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Overrides the current thread's CurrentUICulture property for all
|
|
||||||
/// resource lookups using this strongly typed resource class.
|
|
||||||
/// </summary>
|
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
|
||||||
internal static global::System.Globalization.CultureInfo Culture {
|
|
||||||
get {
|
|
||||||
return resourceCulture;
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
resourceCulture = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap Blank {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("Blank", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Byte[].
|
|
||||||
/// </summary>
|
|
||||||
internal static byte[] courier16px {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("courier16px", resourceCulture);
|
|
||||||
return ((byte[])(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap courier16px_0 {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("courier16px_0", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Byte[].
|
|
||||||
/// </summary>
|
|
||||||
internal static byte[] courier16px1 {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("courier16px1", resourceCulture);
|
|
||||||
return ((byte[])(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap CutHS {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("CutHS", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap ExclamationRed {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("ExclamationRed", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap GameController {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("GameController", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap GreenCheck {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("GreenCheck", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap Help {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("Help", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap HotKeys {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("HotKeys", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap OpenFile {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("OpenFile", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap Pause {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("Pause", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap Play {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("Play", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap ReadOnly {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("ReadOnly", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap reboot {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("reboot", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap Recent {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("Recent", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap RecordHS {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("RecordHS", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap restart {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("restart", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap Save {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("Save", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap SaveAllHS {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("SaveAllHS", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap SaveAs {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("SaveAs", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap Scan {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("Scan", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap Stop {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("Stop", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,190 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<root>
|
|
||||||
<!--
|
|
||||||
Microsoft ResX Schema
|
|
||||||
|
|
||||||
Version 2.0
|
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
|
||||||
that is mostly human readable. The generation and parsing of the
|
|
||||||
various data types are done through the TypeConverter classes
|
|
||||||
associated with the data types.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
|
||||||
<resheader name="version">2.0</resheader>
|
|
||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
|
||||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
|
||||||
</data>
|
|
||||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
|
||||||
<comment>This is a comment</comment>
|
|
||||||
</data>
|
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
|
||||||
name/value pairs.
|
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
|
||||||
text/value conversion through the TypeConverter architecture.
|
|
||||||
Classes that don't support this are serialized and stored with the
|
|
||||||
mimetype set.
|
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
|
||||||
read any of the formats listed below.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
|
||||||
value : The object must be serialized into a byte array
|
|
||||||
: using a System.ComponentModel.TypeConverter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
-->
|
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
|
||||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:choice maxOccurs="unbounded">
|
|
||||||
<xsd:element name="metadata">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="assembly">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:attribute name="alias" type="xsd:string" />
|
|
||||||
<xsd:attribute name="name" type="xsd:string" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="data">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="resheader">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:choice>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:schema>
|
|
||||||
<resheader name="resmimetype">
|
|
||||||
<value>text/microsoft-resx</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="version">
|
|
||||||
<value>2.0</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="reader">
|
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="writer">
|
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
|
||||||
<data name="Blank" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\images\Blank.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="courier16px" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\Resources\courier16px.bmfc;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</data>
|
|
||||||
<data name="courier16px1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\Resources\courier16px.fnt;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</data>
|
|
||||||
<data name="courier16px_0" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\Resources\courier16px_0.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="CutHS" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\images\CutHS.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="ExclamationRed" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\images\ExclamationRed.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="GreenCheck" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\images\GreenCheck.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="OpenFile" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\images\OpenFile.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="Pause" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\images\Pause.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="Play" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\images\Play.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="ReadOnly" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\images\ReadOnly.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="reboot" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\images\reboot.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="Recent" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\images\Recent.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="RecordHS" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\images\RecordHS.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="SaveAllHS" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\images\SaveAllHS.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="SaveAs" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\images\SaveAs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="Scan" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\images\Scan.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="Stop" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\images\Stop.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="GameController" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\images\GameController.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="Help" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\images\Help.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="HotKeys" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\images\HotKeys.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="Save" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\images\Save.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="restart" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\images\restart.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
|
|
@ -1,26 +0,0 @@
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
// <auto-generated>
|
|
||||||
// This code was generated by a tool.
|
|
||||||
// Runtime Version:4.0.30319.42000
|
|
||||||
//
|
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
|
||||||
// the code is regenerated.
|
|
||||||
// </auto-generated>
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
namespace BizHawk.Client.MultiHawk.Properties {
|
|
||||||
|
|
||||||
|
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
|
|
||||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
|
||||||
|
|
||||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
|
||||||
|
|
||||||
public static Settings Default {
|
|
||||||
get {
|
|
||||||
return defaultInstance;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
<?xml version='1.0' encoding='utf-8'?>
|
|
||||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
|
||||||
<Profiles>
|
|
||||||
<Profile Name="(Default)" />
|
|
||||||
</Profiles>
|
|
||||||
<Settings />
|
|
||||||
</SettingsFile>
|
|
|
@ -1,55 +0,0 @@
|
||||||
# AngelCode Bitmap Font Generator configuration file
|
|
||||||
fileVersion=1
|
|
||||||
|
|
||||||
# font settings
|
|
||||||
fontName=Courier
|
|
||||||
fontFile=
|
|
||||||
charSet=0
|
|
||||||
fontSize=16
|
|
||||||
aa=1
|
|
||||||
scaleH=100
|
|
||||||
useSmoothing=0
|
|
||||||
isBold=1
|
|
||||||
isItalic=0
|
|
||||||
useUnicode=1
|
|
||||||
disableBoxChars=1
|
|
||||||
outputInvalidCharGlyph=1
|
|
||||||
dontIncludeKerningPairs=0
|
|
||||||
useHinting=1
|
|
||||||
renderFromOutline=0
|
|
||||||
useClearType=1
|
|
||||||
|
|
||||||
# character alignment
|
|
||||||
paddingDown=0
|
|
||||||
paddingUp=0
|
|
||||||
paddingRight=0
|
|
||||||
paddingLeft=0
|
|
||||||
spacingHoriz=1
|
|
||||||
spacingVert=1
|
|
||||||
useFixedHeight=0
|
|
||||||
forceZero=0
|
|
||||||
|
|
||||||
# output file
|
|
||||||
outWidth=128
|
|
||||||
outHeight=256
|
|
||||||
outBitDepth=32
|
|
||||||
fontDescFormat=1
|
|
||||||
fourChnlPacked=0
|
|
||||||
textureFormat=png
|
|
||||||
textureCompression=0
|
|
||||||
alphaChnl=0
|
|
||||||
redChnl=4
|
|
||||||
greenChnl=4
|
|
||||||
blueChnl=4
|
|
||||||
invA=0
|
|
||||||
invR=0
|
|
||||||
invG=0
|
|
||||||
invB=0
|
|
||||||
|
|
||||||
# outline
|
|
||||||
outlineThickness=0
|
|
||||||
|
|
||||||
# selected chars
|
|
||||||
chars=32-127,129,141,143-144,157,160-255
|
|
||||||
|
|
||||||
# imported icon images
|
|
|
@ -1,208 +0,0 @@
|
||||||
<?xml version="1.0"?>
|
|
||||||
<font>
|
|
||||||
<info face="Courier" size="16" bold="1" italic="0" charset="" unicode="1" stretchH="100" smooth="0" aa="1" padding="0,0,0,0" spacing="1,1" outline="0"/>
|
|
||||||
<common lineHeight="16" base="13" scaleW="128" scaleH="256" pages="1" packed="0" alphaChnl="0" redChnl="4" greenChnl="4" blueChnl="4"/>
|
|
||||||
<pages>
|
|
||||||
<page id="0" file="courier16px_0.png" />
|
|
||||||
</pages>
|
|
||||||
<chars count="198">
|
|
||||||
<char id="-1" x="126" y="73" width="1" height="1" xoffset="0" yoffset="0" xadvance="0" page="0" chnl="15" />
|
|
||||||
<char id="32" x="83" y="137" width="30" height="1" xoffset="-10" yoffset="15" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="33" x="124" y="95" width="2" height="10" xoffset="4" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="34" x="15" y="137" width="5" height="4" xoffset="3" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="35" x="93" y="52" width="9" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="36" x="72" y="28" width="8" height="12" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="37" x="83" y="52" width="9" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="38" x="73" y="53" width="9" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="39" x="125" y="115" width="2" height="4" xoffset="4" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="40" x="61" y="28" width="4" height="13" xoffset="4" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="41" x="56" y="28" width="4" height="13" xoffset="3" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="42" x="106" y="124" width="8" height="5" xoffset="1" yoffset="5" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="43" x="72" y="127" width="8" height="7" xoffset="1" yoffset="5" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="44" x="38" y="135" width="5" height="3" xoffset="3" yoffset="11" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="45" x="106" y="130" width="7" height="1" xoffset="2" yoffset="8" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="46" x="49" y="135" width="3" height="2" xoffset="4" yoffset="11" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="47" x="100" y="107" width="9" height="8" xoffset="1" yoffset="4" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="48" x="52" y="97" width="7" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="49" x="58" y="108" width="6" height="10" xoffset="3" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="50" x="0" y="109" width="7" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="51" x="8" y="109" width="7" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="52" x="60" y="97" width="7" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="53" x="76" y="97" width="7" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="54" x="92" y="96" width="7" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="55" x="100" y="96" width="7" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="56" x="44" y="97" width="7" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="57" x="116" y="95" width="7" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="58" x="121" y="115" width="3" height="7" xoffset="4" yoffset="6" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="59" x="7" y="120" width="5" height="8" xoffset="3" yoffset="6" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="60" x="93" y="107" width="6" height="9" xoffset="2" yoffset="4" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="61" x="30" y="136" width="7" height="3" xoffset="2" yoffset="7" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="62" x="86" y="108" width="6" height="9" xoffset="2" yoffset="4" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="63" x="84" y="97" width="7" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="64" x="90" y="28" width="9" height="11" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="65" x="11" y="53" width="10" height="10" xoffset="0" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="66" x="27" y="75" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="67" x="36" y="75" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="68" x="45" y="75" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="69" x="54" y="75" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="70" x="63" y="75" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="71" x="0" y="65" width="9" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="72" x="0" y="54" width="10" height="10" xoffset="0" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="73" x="51" y="108" width="6" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="74" x="20" y="64" width="9" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="75" x="30" y="64" width="9" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="76" x="72" y="75" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="77" x="107" y="40" width="10" height="10" xoffset="0" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="78" x="19" y="42" width="10" height="10" xoffset="0" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="79" x="81" y="75" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="80" x="40" y="64" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="81" x="81" y="28" width="8" height="12" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="82" x="53" y="53" width="9" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="83" x="90" y="74" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="84" x="41" y="42" width="10" height="10" xoffset="0" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="85" x="22" y="53" width="10" height="10" xoffset="0" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="86" x="63" y="42" width="10" height="10" xoffset="0" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="87" x="74" y="41" width="10" height="10" xoffset="0" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="88" x="85" y="41" width="10" height="10" xoffset="0" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="89" x="96" y="40" width="10" height="10" xoffset="0" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="90" x="99" y="74" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="91" x="51" y="28" width="4" height="13" xoffset="4" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="92" x="110" y="106" width="9" height="8" xoffset="1" yoffset="4" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="93" x="123" y="14" width="4" height="13" xoffset="3" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="94" x="115" y="123" width="8" height="4" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="95" x="114" y="135" width="10" height="1" xoffset="0" yoffset="14" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="96" x="53" y="135" width="3" height="2" xoffset="3" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="97" x="18" y="128" width="8" height="7" xoffset="1" yoffset="6" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="98" x="108" y="73" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="99" x="0" y="129" width="8" height="7" xoffset="1" yoffset="6" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="100" x="117" y="73" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="101" x="103" y="116" width="8" height="7" xoffset="1" yoffset="6" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="102" x="36" y="97" width="7" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="103" x="0" y="87" width="8" height="10" xoffset="1" yoffset="6" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="104" x="9" y="87" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="105" x="30" y="108" width="6" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="106" x="121" y="0" width="6" height="13" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="107" x="18" y="76" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="108" x="23" y="109" width="6" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="109" x="46" y="119" width="10" height="7" xoffset="0" yoffset="6" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="110" x="76" y="118" width="8" height="7" xoffset="1" yoffset="6" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="111" x="63" y="127" width="8" height="7" xoffset="1" yoffset="6" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="112" x="18" y="87" width="8" height="10" xoffset="1" yoffset="6" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="113" x="27" y="86" width="8" height="10" xoffset="1" yoffset="6" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="114" x="57" y="119" width="9" height="7" xoffset="1" yoffset="6" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="115" x="9" y="129" width="8" height="7" xoffset="1" yoffset="6" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="116" x="68" y="108" width="8" height="9" xoffset="1" yoffset="4" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="117" x="94" y="117" width="8" height="7" xoffset="1" yoffset="6" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="118" x="24" y="120" width="10" height="7" xoffset="0" yoffset="6" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="119" x="35" y="119" width="10" height="7" xoffset="0" yoffset="6" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="120" x="54" y="127" width="8" height="7" xoffset="1" yoffset="6" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="121" x="8" y="42" width="10" height="10" xoffset="0" yoffset="6" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="122" x="27" y="128" width="8" height="7" xoffset="1" yoffset="6" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="123" x="9" y="28" width="6" height="13" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="124" x="66" y="28" width="2" height="13" xoffset="4" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="125" x="37" y="28" width="6" height="13" xoffset="3" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="126" x="21" y="136" width="8" height="3" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="127" x="123" y="51" width="4" height="10" xoffset="3" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="129" x="92" y="133" width="30" height="1" xoffset="-10" yoffset="15" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="141" x="52" y="140" width="30" height="1" xoffset="-10" yoffset="15" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="143" x="21" y="140" width="30" height="1" xoffset="-10" yoffset="15" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="144" x="61" y="135" width="30" height="1" xoffset="-10" yoffset="15" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="157" x="83" y="139" width="30" height="1" xoffset="-10" yoffset="15" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="160" x="52" y="138" width="30" height="1" xoffset="-10" yoffset="15" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="161" x="65" y="108" width="2" height="10" xoffset="4" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="162" x="0" y="42" width="7" height="11" xoffset="2" yoffset="4" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="163" x="68" y="97" width="7" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="164" x="81" y="126" width="7" height="6" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="165" x="30" y="42" width="10" height="10" xoffset="0" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="166" x="69" y="28" width="2" height="13" xoffset="4" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="167" x="110" y="28" width="8" height="11" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="168" x="100" y="135" width="5" height="1" xoffset="3" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="169" x="10" y="65" width="9" height="10" xoffset="1" yoffset="2" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="170" x="120" y="106" width="7" height="8" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="171" x="67" y="119" width="8" height="7" xoffset="1" yoffset="5" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="172" x="0" y="137" width="8" height="4" xoffset="1" yoffset="7" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="173" x="92" y="135" width="7" height="1" xoffset="2" yoffset="8" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="174" x="33" y="53" width="9" height="10" xoffset="1" yoffset="2" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="175" x="81" y="133" width="10" height="1" xoffset="0" yoffset="1" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="176" x="9" y="137" width="5" height="4" xoffset="3" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="177" x="77" y="108" width="8" height="9" xoffset="1" yoffset="4" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="178" x="95" y="125" width="5" height="6" xoffset="3" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="179" x="89" y="126" width="5" height="6" xoffset="3" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="180" x="57" y="135" width="3" height="2" xoffset="4" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="181" x="100" y="28" width="9" height="11" xoffset="1" yoffset="5" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="182" x="63" y="53" width="9" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="183" x="124" y="123" width="3" height="2" xoffset="4" yoffset="7" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="184" x="44" y="135" width="4" height="3" xoffset="3" yoffset="13" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="185" x="101" y="125" width="4" height="6" xoffset="3" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="186" x="0" y="120" width="6" height="8" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="187" x="85" y="118" width="8" height="7" xoffset="1" yoffset="5" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="188" x="103" y="51" width="9" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="189" x="118" y="40" width="9" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="190" x="113" y="51" width="9" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="191" x="108" y="95" width="7" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="192" x="88" y="0" width="10" height="13" xoffset="0" yoffset="0" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="193" x="11" y="0" width="10" height="13" xoffset="0" yoffset="0" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="194" x="22" y="0" width="10" height="13" xoffset="0" yoffset="0" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="195" x="22" y="14" width="10" height="13" xoffset="0" yoffset="0" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="196" x="11" y="14" width="10" height="13" xoffset="0" yoffset="0" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="197" x="0" y="14" width="10" height="13" xoffset="0" yoffset="0" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="198" x="52" y="42" width="10" height="10" xoffset="0" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="199" x="42" y="14" width="8" height="13" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="200" x="96" y="14" width="8" height="13" xoffset="1" yoffset="0" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="201" x="87" y="14" width="8" height="13" xoffset="1" yoffset="0" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="202" x="78" y="14" width="8" height="13" xoffset="1" yoffset="0" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="203" x="69" y="14" width="8" height="13" xoffset="1" yoffset="0" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="204" x="44" y="28" width="6" height="13" xoffset="2" yoffset="0" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="205" x="23" y="28" width="6" height="13" xoffset="2" yoffset="0" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="206" x="16" y="28" width="6" height="13" xoffset="2" yoffset="0" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="207" x="30" y="28" width="6" height="13" xoffset="2" yoffset="0" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="208" x="43" y="53" width="9" height="10" xoffset="0" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="209" x="99" y="0" width="10" height="13" xoffset="0" yoffset="0" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="210" x="60" y="14" width="8" height="13" xoffset="1" yoffset="0" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="211" x="51" y="14" width="8" height="13" xoffset="1" yoffset="0" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="212" x="0" y="28" width="8" height="13" xoffset="1" yoffset="0" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="213" x="114" y="14" width="8" height="13" xoffset="1" yoffset="0" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="214" x="105" y="14" width="8" height="13" xoffset="1" yoffset="0" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="215" x="112" y="115" width="8" height="7" xoffset="1" yoffset="5" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="216" x="45" y="86" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="217" x="110" y="0" width="10" height="13" xoffset="0" yoffset="0" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="218" x="0" y="0" width="10" height="13" xoffset="0" yoffset="0" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="219" x="44" y="0" width="10" height="13" xoffset="0" yoffset="0" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="220" x="77" y="0" width="10" height="13" xoffset="0" yoffset="0" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="221" x="55" y="0" width="10" height="13" xoffset="0" yoffset="0" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="222" x="54" y="86" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="223" x="63" y="86" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="224" x="72" y="86" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="225" x="81" y="86" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="226" x="90" y="85" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="227" x="99" y="85" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="228" x="108" y="84" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="229" x="119" y="28" width="8" height="11" xoffset="1" yoffset="2" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="230" x="13" y="120" width="10" height="7" xoffset="0" yoffset="6" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="231" x="117" y="84" width="8" height="10" xoffset="1" yoffset="6" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="232" x="36" y="86" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="233" x="0" y="98" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="234" x="9" y="98" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="235" x="18" y="98" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="236" x="44" y="108" width="6" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="237" x="37" y="108" width="6" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="238" x="16" y="109" width="6" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="239" x="121" y="62" width="6" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="240" x="27" y="97" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="241" x="49" y="64" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="242" x="58" y="64" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="243" x="67" y="64" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="244" x="76" y="64" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="245" x="85" y="63" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="246" x="94" y="63" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="247" x="36" y="127" width="8" height="7" xoffset="1" yoffset="5" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="248" x="45" y="127" width="8" height="7" xoffset="1" yoffset="6" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="249" x="103" y="62" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="250" x="112" y="62" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="251" x="0" y="76" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="252" x="9" y="76" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="253" x="66" y="0" width="10" height="13" xoffset="0" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="254" x="33" y="14" width="8" height="13" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
<char id="255" x="33" y="0" width="10" height="13" xoffset="0" yoffset="3" xadvance="10" page="0" chnl="15" />
|
|
||||||
</chars>
|
|
||||||
</font>
|
|
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 154 B |
Before Width: | Height: | Size: 578 B |
Before Width: | Height: | Size: 676 B |
Before Width: | Height: | Size: 806 B |
Before Width: | Height: | Size: 576 B |
Before Width: | Height: | Size: 646 B |
Before Width: | Height: | Size: 751 B |
Before Width: | Height: | Size: 743 B |
Before Width: | Height: | Size: 886 B |
Before Width: | Height: | Size: 382 B |
Before Width: | Height: | Size: 698 B |
Before Width: | Height: | Size: 907 B |
Before Width: | Height: | Size: 358 B |
Before Width: | Height: | Size: 857 B |
Before Width: | Height: | Size: 623 B |
Before Width: | Height: | Size: 595 B |
Before Width: | Height: | Size: 544 B |
Before Width: | Height: | Size: 441 B |
Before Width: | Height: | Size: 1013 B |
Before Width: | Height: | Size: 473 B |
|
@ -1,406 +0,0 @@
|
||||||
namespace BizHawk.Client.MultiHawk
|
|
||||||
{
|
|
||||||
partial class PlayMovie
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Required designer variable.
|
|
||||||
/// </summary>
|
|
||||||
private System.ComponentModel.IContainer components = null;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Clean up any resources being used.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
|
||||||
protected override void Dispose(bool disposing)
|
|
||||||
{
|
|
||||||
if (disposing && (components != null))
|
|
||||||
{
|
|
||||||
components.Dispose();
|
|
||||||
}
|
|
||||||
base.Dispose(disposing);
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Windows Form Designer generated code
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Required method for Designer support - do not modify
|
|
||||||
/// the contents of this method with the code editor.
|
|
||||||
/// </summary>
|
|
||||||
private void InitializeComponent()
|
|
||||||
{
|
|
||||||
this.components = new System.ComponentModel.Container();
|
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PlayMovie));
|
|
||||||
this.Cancel = new System.Windows.Forms.Button();
|
|
||||||
this.OK = new System.Windows.Forms.Button();
|
|
||||||
this.BrowseMovies = new System.Windows.Forms.Button();
|
|
||||||
this.DetailsView = new System.Windows.Forms.ListView();
|
|
||||||
this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
|
||||||
this.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
|
||||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
|
||||||
this.SubtitlesBtn = new System.Windows.Forms.Button();
|
|
||||||
this.CommentsBtn = new System.Windows.Forms.Button();
|
|
||||||
this.MovieCount = new System.Windows.Forms.Label();
|
|
||||||
this.ReadOnlyCheckBox = new System.Windows.Forms.CheckBox();
|
|
||||||
this.IncludeSubDirectories = new System.Windows.Forms.CheckBox();
|
|
||||||
this.Scan = new System.Windows.Forms.Button();
|
|
||||||
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
|
||||||
this.MatchHashCheckBox = new System.Windows.Forms.CheckBox();
|
|
||||||
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
|
||||||
this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.StopOnFrameCheckbox = new System.Windows.Forms.CheckBox();
|
|
||||||
this.StopOnFrameTextBox = new BizHawk.Client.EmuHawk.WatchValueBox();
|
|
||||||
this.MovieView = new BizHawk.Client.EmuHawk.VirtualListView();
|
|
||||||
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
|
||||||
this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
|
||||||
this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
|
||||||
this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
|
||||||
this.LastFrameCheckbox = new System.Windows.Forms.CheckBox();
|
|
||||||
this.TurboCheckbox = new System.Windows.Forms.CheckBox();
|
|
||||||
this.groupBox1.SuspendLayout();
|
|
||||||
this.contextMenuStrip1.SuspendLayout();
|
|
||||||
this.SuspendLayout();
|
|
||||||
//
|
|
||||||
// Cancel
|
|
||||||
//
|
|
||||||
this.Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
|
||||||
this.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
|
||||||
this.Cancel.Location = new System.Drawing.Point(687, 363);
|
|
||||||
this.Cancel.Name = "Cancel";
|
|
||||||
this.Cancel.Size = new System.Drawing.Size(75, 23);
|
|
||||||
this.Cancel.TabIndex = 55;
|
|
||||||
this.Cancel.Text = "&Cancel";
|
|
||||||
this.Cancel.UseVisualStyleBackColor = true;
|
|
||||||
this.Cancel.Click += new System.EventHandler(this.Cancel_Click);
|
|
||||||
//
|
|
||||||
// OK
|
|
||||||
//
|
|
||||||
this.OK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
|
||||||
this.OK.Location = new System.Drawing.Point(606, 363);
|
|
||||||
this.OK.Name = "OK";
|
|
||||||
this.OK.Size = new System.Drawing.Size(75, 23);
|
|
||||||
this.OK.TabIndex = 50;
|
|
||||||
this.OK.Text = "&OK";
|
|
||||||
this.toolTip1.SetToolTip(this.OK, "Load selected movie");
|
|
||||||
this.OK.UseVisualStyleBackColor = true;
|
|
||||||
this.OK.Click += new System.EventHandler(this.Ok_Click);
|
|
||||||
//
|
|
||||||
// BrowseMovies
|
|
||||||
//
|
|
||||||
this.BrowseMovies.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
|
||||||
this.BrowseMovies.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.OpenFile;
|
|
||||||
this.BrowseMovies.Location = new System.Drawing.Point(12, 364);
|
|
||||||
this.BrowseMovies.Name = "BrowseMovies";
|
|
||||||
this.BrowseMovies.Size = new System.Drawing.Size(31, 23);
|
|
||||||
this.BrowseMovies.TabIndex = 25;
|
|
||||||
this.toolTip1.SetToolTip(this.BrowseMovies, "Browse for additional movie files");
|
|
||||||
this.BrowseMovies.UseVisualStyleBackColor = true;
|
|
||||||
this.BrowseMovies.Click += new System.EventHandler(this.BrowseMovies_Click);
|
|
||||||
//
|
|
||||||
// DetailsView
|
|
||||||
//
|
|
||||||
this.DetailsView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
|
||||||
| System.Windows.Forms.AnchorStyles.Left)
|
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
|
||||||
this.DetailsView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
|
||||||
this.columnHeader5,
|
|
||||||
this.columnHeader6});
|
|
||||||
this.DetailsView.FullRowSelect = true;
|
|
||||||
this.DetailsView.GridLines = true;
|
|
||||||
this.DetailsView.HideSelection = false;
|
|
||||||
this.DetailsView.Location = new System.Drawing.Point(15, 19);
|
|
||||||
this.DetailsView.Name = "DetailsView";
|
|
||||||
this.DetailsView.Size = new System.Drawing.Size(228, 261);
|
|
||||||
this.DetailsView.TabIndex = 10;
|
|
||||||
this.toolTip1.SetToolTip(this.DetailsView, "Contains the header information for the selected movie");
|
|
||||||
this.DetailsView.UseCompatibleStateImageBehavior = false;
|
|
||||||
this.DetailsView.View = System.Windows.Forms.View.Details;
|
|
||||||
this.DetailsView.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.DetailsView_ColumnClick);
|
|
||||||
//
|
|
||||||
// columnHeader5
|
|
||||||
//
|
|
||||||
this.columnHeader5.Text = "Header";
|
|
||||||
this.columnHeader5.Width = 102;
|
|
||||||
//
|
|
||||||
// columnHeader6
|
|
||||||
//
|
|
||||||
this.columnHeader6.Text = "Value";
|
|
||||||
this.columnHeader6.Width = 121;
|
|
||||||
//
|
|
||||||
// groupBox1
|
|
||||||
//
|
|
||||||
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
|
||||||
this.groupBox1.Controls.Add(this.SubtitlesBtn);
|
|
||||||
this.groupBox1.Controls.Add(this.CommentsBtn);
|
|
||||||
this.groupBox1.Controls.Add(this.DetailsView);
|
|
||||||
this.groupBox1.Location = new System.Drawing.Point(503, 28);
|
|
||||||
this.groupBox1.Name = "groupBox1";
|
|
||||||
this.groupBox1.Size = new System.Drawing.Size(259, 322);
|
|
||||||
this.groupBox1.TabIndex = 6;
|
|
||||||
this.groupBox1.TabStop = false;
|
|
||||||
this.groupBox1.Text = "Details";
|
|
||||||
//
|
|
||||||
// SubtitlesBtn
|
|
||||||
//
|
|
||||||
this.SubtitlesBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
|
||||||
this.SubtitlesBtn.Enabled = false;
|
|
||||||
this.SubtitlesBtn.Location = new System.Drawing.Point(125, 286);
|
|
||||||
this.SubtitlesBtn.Name = "SubtitlesBtn";
|
|
||||||
this.SubtitlesBtn.Size = new System.Drawing.Size(75, 23);
|
|
||||||
this.SubtitlesBtn.TabIndex = 20;
|
|
||||||
this.SubtitlesBtn.Text = "Subtitles";
|
|
||||||
this.SubtitlesBtn.UseVisualStyleBackColor = true;
|
|
||||||
this.SubtitlesBtn.Click += new System.EventHandler(this.SubtitlesBtn_Click);
|
|
||||||
//
|
|
||||||
// CommentsBtn
|
|
||||||
//
|
|
||||||
this.CommentsBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
|
||||||
this.CommentsBtn.Enabled = false;
|
|
||||||
this.CommentsBtn.Location = new System.Drawing.Point(15, 286);
|
|
||||||
this.CommentsBtn.Name = "CommentsBtn";
|
|
||||||
this.CommentsBtn.Size = new System.Drawing.Size(75, 23);
|
|
||||||
this.CommentsBtn.TabIndex = 15;
|
|
||||||
this.CommentsBtn.Text = "Comments";
|
|
||||||
this.CommentsBtn.UseVisualStyleBackColor = true;
|
|
||||||
this.CommentsBtn.Click += new System.EventHandler(this.CommentsBtn_Click);
|
|
||||||
//
|
|
||||||
// MovieCount
|
|
||||||
//
|
|
||||||
this.MovieCount.AutoSize = true;
|
|
||||||
this.MovieCount.Location = new System.Drawing.Point(12, 9);
|
|
||||||
this.MovieCount.Name = "MovieCount";
|
|
||||||
this.MovieCount.Size = new System.Drawing.Size(31, 13);
|
|
||||||
this.MovieCount.TabIndex = 7;
|
|
||||||
this.MovieCount.Text = " ";
|
|
||||||
//
|
|
||||||
// ReadOnlyCheckBox
|
|
||||||
//
|
|
||||||
this.ReadOnlyCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
|
||||||
this.ReadOnlyCheckBox.AutoSize = true;
|
|
||||||
this.ReadOnlyCheckBox.Checked = true;
|
|
||||||
this.ReadOnlyCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
|
|
||||||
this.ReadOnlyCheckBox.Location = new System.Drawing.Point(503, 367);
|
|
||||||
this.ReadOnlyCheckBox.Name = "ReadOnlyCheckBox";
|
|
||||||
this.ReadOnlyCheckBox.Size = new System.Drawing.Size(74, 17);
|
|
||||||
this.ReadOnlyCheckBox.TabIndex = 45;
|
|
||||||
this.ReadOnlyCheckBox.Text = "Read only";
|
|
||||||
this.ReadOnlyCheckBox.UseVisualStyleBackColor = true;
|
|
||||||
//
|
|
||||||
// IncludeSubDirectories
|
|
||||||
//
|
|
||||||
this.IncludeSubDirectories.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
|
||||||
this.IncludeSubDirectories.AutoSize = true;
|
|
||||||
this.IncludeSubDirectories.Location = new System.Drawing.Point(94, 375);
|
|
||||||
this.IncludeSubDirectories.Name = "IncludeSubDirectories";
|
|
||||||
this.IncludeSubDirectories.Size = new System.Drawing.Size(131, 17);
|
|
||||||
this.IncludeSubDirectories.TabIndex = 35;
|
|
||||||
this.IncludeSubDirectories.Text = "Include Subdirectories";
|
|
||||||
this.IncludeSubDirectories.UseVisualStyleBackColor = true;
|
|
||||||
this.IncludeSubDirectories.CheckedChanged += new System.EventHandler(this.IncludeSubDirectories_CheckedChanged);
|
|
||||||
//
|
|
||||||
// Scan
|
|
||||||
//
|
|
||||||
this.Scan.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
|
||||||
this.Scan.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.Scan;
|
|
||||||
this.Scan.Location = new System.Drawing.Point(49, 364);
|
|
||||||
this.Scan.Name = "Scan";
|
|
||||||
this.Scan.Size = new System.Drawing.Size(27, 23);
|
|
||||||
this.Scan.TabIndex = 30;
|
|
||||||
this.toolTip1.SetToolTip(this.Scan, "Rescan Movie folder for movie files");
|
|
||||||
this.Scan.UseVisualStyleBackColor = true;
|
|
||||||
this.Scan.Click += new System.EventHandler(this.Scan_Click);
|
|
||||||
//
|
|
||||||
// MatchHashCheckBox
|
|
||||||
//
|
|
||||||
this.MatchHashCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
|
||||||
this.MatchHashCheckBox.AutoSize = true;
|
|
||||||
this.MatchHashCheckBox.Location = new System.Drawing.Point(94, 357);
|
|
||||||
this.MatchHashCheckBox.Name = "MatchHashCheckBox";
|
|
||||||
this.MatchHashCheckBox.Size = new System.Drawing.Size(147, 17);
|
|
||||||
this.MatchHashCheckBox.TabIndex = 56;
|
|
||||||
this.MatchHashCheckBox.Text = "Match current game hash";
|
|
||||||
this.MatchHashCheckBox.UseVisualStyleBackColor = true;
|
|
||||||
this.MatchHashCheckBox.CheckedChanged += new System.EventHandler(this.MatchHashCheckBox_CheckedChanged);
|
|
||||||
//
|
|
||||||
// contextMenuStrip1
|
|
||||||
//
|
|
||||||
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
|
||||||
this.editToolStripMenuItem});
|
|
||||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
|
||||||
this.contextMenuStrip1.Size = new System.Drawing.Size(93, 26);
|
|
||||||
//
|
|
||||||
// editToolStripMenuItem
|
|
||||||
//
|
|
||||||
this.editToolStripMenuItem.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.CutHS;
|
|
||||||
this.editToolStripMenuItem.Name = "editToolStripMenuItem";
|
|
||||||
this.editToolStripMenuItem.Size = new System.Drawing.Size(92, 22);
|
|
||||||
this.editToolStripMenuItem.Text = "&Edit";
|
|
||||||
this.editToolStripMenuItem.Click += new System.EventHandler(this.EditMenuItem_Click);
|
|
||||||
//
|
|
||||||
// StopOnFrameCheckbox
|
|
||||||
//
|
|
||||||
this.StopOnFrameCheckbox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
|
||||||
this.StopOnFrameCheckbox.AutoSize = true;
|
|
||||||
this.StopOnFrameCheckbox.Location = new System.Drawing.Point(342, 357);
|
|
||||||
this.StopOnFrameCheckbox.Name = "StopOnFrameCheckbox";
|
|
||||||
this.StopOnFrameCheckbox.Size = new System.Drawing.Size(95, 17);
|
|
||||||
this.StopOnFrameCheckbox.TabIndex = 57;
|
|
||||||
this.StopOnFrameCheckbox.Text = "Stop on frame:";
|
|
||||||
this.StopOnFrameCheckbox.UseVisualStyleBackColor = true;
|
|
||||||
this.StopOnFrameCheckbox.CheckedChanged += new System.EventHandler(this.StopOnFrameCheckbox_CheckedChanged);
|
|
||||||
//
|
|
||||||
// StopOnFrameTextBox
|
|
||||||
//
|
|
||||||
this.StopOnFrameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
|
||||||
this.StopOnFrameTextBox.ByteSize = BizHawk.Client.Common.WatchSize.DWord;
|
|
||||||
this.StopOnFrameTextBox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
|
|
||||||
this.StopOnFrameTextBox.Location = new System.Drawing.Point(438, 355);
|
|
||||||
this.StopOnFrameTextBox.MaxLength = 10;
|
|
||||||
this.StopOnFrameTextBox.Name = "StopOnFrameTextBox";
|
|
||||||
this.StopOnFrameTextBox.Nullable = true;
|
|
||||||
this.StopOnFrameTextBox.Size = new System.Drawing.Size(54, 20);
|
|
||||||
this.StopOnFrameTextBox.TabIndex = 58;
|
|
||||||
this.StopOnFrameTextBox.Type = BizHawk.Client.Common.DisplayType.Unsigned;
|
|
||||||
this.StopOnFrameTextBox.TextChanged += new System.EventHandler(this.StopOnFrameTextBox_TextChanged_1);
|
|
||||||
//
|
|
||||||
// MovieView
|
|
||||||
//
|
|
||||||
this.MovieView.AllowDrop = true;
|
|
||||||
this.MovieView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
|
||||||
this.MovieView.BlazingFast = false;
|
|
||||||
this.MovieView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
|
||||||
this.columnHeader1,
|
|
||||||
this.columnHeader2,
|
|
||||||
this.columnHeader3,
|
|
||||||
this.columnHeader4});
|
|
||||||
this.MovieView.ContextMenuStrip = this.contextMenuStrip1;
|
|
||||||
this.MovieView.FullRowSelect = true;
|
|
||||||
this.MovieView.GridLines = true;
|
|
||||||
this.MovieView.HideSelection = false;
|
|
||||||
this.MovieView.ItemCount = 0;
|
|
||||||
this.MovieView.Location = new System.Drawing.Point(12, 28);
|
|
||||||
this.MovieView.MultiSelect = false;
|
|
||||||
this.MovieView.Name = "MovieView";
|
|
||||||
this.MovieView.SelectAllInProgress = false;
|
|
||||||
this.MovieView.selectedItem = -1;
|
|
||||||
this.MovieView.Size = new System.Drawing.Size(480, 322);
|
|
||||||
this.MovieView.TabIndex = 5;
|
|
||||||
this.MovieView.UseCompatibleStateImageBehavior = false;
|
|
||||||
this.MovieView.UseCustomBackground = true;
|
|
||||||
this.MovieView.View = System.Windows.Forms.View.Details;
|
|
||||||
this.MovieView.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.MovieView_ColumnClick);
|
|
||||||
this.MovieView.SelectedIndexChanged += new System.EventHandler(this.MovieView_SelectedIndexChanged);
|
|
||||||
this.MovieView.DragDrop += new System.Windows.Forms.DragEventHandler(this.MovieView_DragDrop);
|
|
||||||
this.MovieView.DragEnter += new System.Windows.Forms.DragEventHandler(this.MovieView_DragEnter);
|
|
||||||
this.MovieView.DoubleClick += new System.EventHandler(this.MovieView_DoubleClick);
|
|
||||||
this.MovieView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.MovieView_KeyDown);
|
|
||||||
//
|
|
||||||
// columnHeader1
|
|
||||||
//
|
|
||||||
this.columnHeader1.Text = "File";
|
|
||||||
this.columnHeader1.Width = 221;
|
|
||||||
//
|
|
||||||
// columnHeader2
|
|
||||||
//
|
|
||||||
this.columnHeader2.Text = "SysID";
|
|
||||||
this.columnHeader2.Width = 43;
|
|
||||||
//
|
|
||||||
// columnHeader3
|
|
||||||
//
|
|
||||||
this.columnHeader3.Text = "Game";
|
|
||||||
this.columnHeader3.Width = 129;
|
|
||||||
//
|
|
||||||
// columnHeader4
|
|
||||||
//
|
|
||||||
this.columnHeader4.Text = "Length (est.)";
|
|
||||||
this.columnHeader4.Width = 82;
|
|
||||||
//
|
|
||||||
// LastFrameCheckbox
|
|
||||||
//
|
|
||||||
this.LastFrameCheckbox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
|
||||||
this.LastFrameCheckbox.AutoSize = true;
|
|
||||||
this.LastFrameCheckbox.Location = new System.Drawing.Point(342, 376);
|
|
||||||
this.LastFrameCheckbox.Name = "LastFrameCheckbox";
|
|
||||||
this.LastFrameCheckbox.Size = new System.Drawing.Size(75, 17);
|
|
||||||
this.LastFrameCheckbox.TabIndex = 59;
|
|
||||||
this.LastFrameCheckbox.Text = "Last frame";
|
|
||||||
this.LastFrameCheckbox.UseVisualStyleBackColor = true;
|
|
||||||
this.LastFrameCheckbox.CheckedChanged += new System.EventHandler(this.LastFrameCheckbox_CheckedChanged);
|
|
||||||
//
|
|
||||||
// TurboCheckbox
|
|
||||||
//
|
|
||||||
this.TurboCheckbox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
|
||||||
this.TurboCheckbox.AutoSize = true;
|
|
||||||
this.TurboCheckbox.Location = new System.Drawing.Point(438, 376);
|
|
||||||
this.TurboCheckbox.Name = "TurboCheckbox";
|
|
||||||
this.TurboCheckbox.Size = new System.Drawing.Size(54, 17);
|
|
||||||
this.TurboCheckbox.TabIndex = 60;
|
|
||||||
this.TurboCheckbox.Text = "Turbo";
|
|
||||||
this.TurboCheckbox.UseVisualStyleBackColor = true;
|
|
||||||
//
|
|
||||||
// PlayMovie
|
|
||||||
//
|
|
||||||
this.AcceptButton = this.OK;
|
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
|
||||||
this.CancelButton = this.Cancel;
|
|
||||||
this.ClientSize = new System.Drawing.Size(774, 398);
|
|
||||||
this.Controls.Add(this.TurboCheckbox);
|
|
||||||
this.Controls.Add(this.LastFrameCheckbox);
|
|
||||||
this.Controls.Add(this.StopOnFrameTextBox);
|
|
||||||
this.Controls.Add(this.StopOnFrameCheckbox);
|
|
||||||
this.Controls.Add(this.MatchHashCheckBox);
|
|
||||||
this.Controls.Add(this.Scan);
|
|
||||||
this.Controls.Add(this.IncludeSubDirectories);
|
|
||||||
this.Controls.Add(this.ReadOnlyCheckBox);
|
|
||||||
this.Controls.Add(this.MovieCount);
|
|
||||||
this.Controls.Add(this.groupBox1);
|
|
||||||
this.Controls.Add(this.MovieView);
|
|
||||||
this.Controls.Add(this.BrowseMovies);
|
|
||||||
this.Controls.Add(this.OK);
|
|
||||||
this.Controls.Add(this.Cancel);
|
|
||||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
|
||||||
this.MaximizeBox = false;
|
|
||||||
this.MinimizeBox = false;
|
|
||||||
this.MinimumSize = new System.Drawing.Size(547, 228);
|
|
||||||
this.Name = "PlayMovie";
|
|
||||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
|
||||||
this.Text = "Play Movie";
|
|
||||||
this.Load += new System.EventHandler(this.PlayMovie_Load);
|
|
||||||
this.groupBox1.ResumeLayout(false);
|
|
||||||
this.contextMenuStrip1.ResumeLayout(false);
|
|
||||||
this.ResumeLayout(false);
|
|
||||||
this.PerformLayout();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
private System.Windows.Forms.Button Cancel;
|
|
||||||
private System.Windows.Forms.Button OK;
|
|
||||||
private System.Windows.Forms.Button BrowseMovies;
|
|
||||||
private BizHawk.Client.EmuHawk.VirtualListView MovieView;
|
|
||||||
private System.Windows.Forms.ColumnHeader columnHeader1;
|
|
||||||
private System.Windows.Forms.ColumnHeader columnHeader2;
|
|
||||||
private System.Windows.Forms.ColumnHeader columnHeader3;
|
|
||||||
private System.Windows.Forms.ColumnHeader columnHeader4;
|
|
||||||
private System.Windows.Forms.ListView DetailsView;
|
|
||||||
private System.Windows.Forms.ColumnHeader columnHeader5;
|
|
||||||
private System.Windows.Forms.ColumnHeader columnHeader6;
|
|
||||||
private System.Windows.Forms.GroupBox groupBox1;
|
|
||||||
private System.Windows.Forms.Button SubtitlesBtn;
|
|
||||||
private System.Windows.Forms.Button CommentsBtn;
|
|
||||||
private System.Windows.Forms.Label MovieCount;
|
|
||||||
private System.Windows.Forms.CheckBox ReadOnlyCheckBox;
|
|
||||||
private System.Windows.Forms.CheckBox IncludeSubDirectories;
|
|
||||||
private System.Windows.Forms.Button Scan;
|
|
||||||
private System.Windows.Forms.ToolTip toolTip1;
|
|
||||||
private System.Windows.Forms.CheckBox MatchHashCheckBox;
|
|
||||||
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem;
|
|
||||||
private System.Windows.Forms.CheckBox StopOnFrameCheckbox;
|
|
||||||
private BizHawk.Client.EmuHawk.WatchValueBox StopOnFrameTextBox;
|
|
||||||
private System.Windows.Forms.CheckBox LastFrameCheckbox;
|
|
||||||
private System.Windows.Forms.CheckBox TurboCheckbox;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,673 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
|
|
||||||
using BizHawk.Client.Common;
|
|
||||||
using BizHawk.Common;
|
|
||||||
using BizHawk.Client.EmuHawk;
|
|
||||||
namespace BizHawk.Client.MultiHawk
|
|
||||||
{
|
|
||||||
public partial class PlayMovie : Form
|
|
||||||
{
|
|
||||||
private readonly PlatformFrameRates PlatformFrameRates = new PlatformFrameRates();
|
|
||||||
|
|
||||||
private List<IMovie> _movieList = new List<IMovie>();
|
|
||||||
private bool _sortReverse;
|
|
||||||
private string _sortedCol;
|
|
||||||
|
|
||||||
private bool _sortDetailsReverse;
|
|
||||||
private string _sortedDetailsCol;
|
|
||||||
|
|
||||||
public PlayMovie()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
MovieView.QueryItemText += MovieView_QueryItemText;
|
|
||||||
MovieView.VirtualMode = true;
|
|
||||||
_sortReverse = false;
|
|
||||||
_sortedCol = "";
|
|
||||||
|
|
||||||
_sortDetailsReverse = false;
|
|
||||||
_sortedDetailsCol = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
private void PlayMovie_Load(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
IncludeSubDirectories.Checked = Global.Config.PlayMovie_IncludeSubdir;
|
|
||||||
MatchHashCheckBox.Checked = Global.Config.PlayMovie_MatchHash;
|
|
||||||
ScanFiles();
|
|
||||||
PreHighlightMovie();
|
|
||||||
TurboCheckbox.Checked = Global.Config.TurboSeek;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void MovieView_QueryItemText(int index, int column, out string text)
|
|
||||||
{
|
|
||||||
text = "";
|
|
||||||
if (column == 0) // File
|
|
||||||
{
|
|
||||||
text = Path.GetFileName(_movieList[index].Filename);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (column == 1) // System
|
|
||||||
{
|
|
||||||
text = _movieList[index].SystemID;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (column == 2) // Game
|
|
||||||
{
|
|
||||||
text = _movieList[index].GameName;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (column == 3) // Time
|
|
||||||
{
|
|
||||||
text = PlatformFrameRates.MovieTime(_movieList[index]).ToString(@"hh\:mm\:ss\.fff");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Run()
|
|
||||||
{
|
|
||||||
var indices = MovieView.SelectedIndices;
|
|
||||||
if (indices.Count > 0) // Import file if necessary
|
|
||||||
{
|
|
||||||
GlobalWin.MainForm.StartNewMovie(_movieList[MovieView.SelectedIndices[0]], false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private int? AddMovieToList(string filename, bool force)
|
|
||||||
{
|
|
||||||
using (var file = new HawkFile(filename))
|
|
||||||
{
|
|
||||||
if (!file.Exists)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
var index = IsDuplicateOf(filename);
|
|
||||||
if (!index.HasValue)
|
|
||||||
{
|
|
||||||
//System.Diagnostics.Stopwatch watch = new System.Diagnostics.Stopwatch(); watch.Start();
|
|
||||||
var movie = PreLoadMovieFile(file, force);
|
|
||||||
if (movie == null)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
//watch.Stop(); Console.WriteLine("[{0}] {1}",watch.ElapsedMilliseconds,Path.GetFileName(filename));
|
|
||||||
|
|
||||||
lock (_movieList)
|
|
||||||
{
|
|
||||||
_movieList.Add(movie);
|
|
||||||
index = _movieList.Count - 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
_sortReverse = false;
|
|
||||||
_sortedCol = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
return index;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private int? IsDuplicateOf(string filename)
|
|
||||||
{
|
|
||||||
for (var i = 0; i < _movieList.Count; i++)
|
|
||||||
{
|
|
||||||
if (_movieList[i].Filename == filename)
|
|
||||||
{
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private IMovie PreLoadMovieFile(HawkFile hf, bool force)
|
|
||||||
{
|
|
||||||
var movie = MovieService.Get(hf.CanonicalFullPath);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
movie.PreLoadHeaderAndLength(hf);
|
|
||||||
|
|
||||||
// Don't do this from browse
|
|
||||||
if (movie.Hash == Global.Game.Hash ||
|
|
||||||
Global.Config.PlayMovie_MatchHash == false || force)
|
|
||||||
{
|
|
||||||
return movie;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
// TODO: inform the user that a movie failed to parse in some way
|
|
||||||
Console.WriteLine(ex.Message);
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void UpdateList()
|
|
||||||
{
|
|
||||||
MovieView.Refresh();
|
|
||||||
MovieCount.Text = _movieList.Count + " movie"
|
|
||||||
+ (_movieList.Count != 1 ? "s" : "");
|
|
||||||
}
|
|
||||||
|
|
||||||
private void PreHighlightMovie()
|
|
||||||
{
|
|
||||||
if (Global.Game == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var indices = new List<int>();
|
|
||||||
|
|
||||||
// Pull out matching names
|
|
||||||
for (var i = 0; i < _movieList.Count; i++)
|
|
||||||
{
|
|
||||||
if (PathManager.FilesystemSafeName(Global.Game) == _movieList[i].GameName)
|
|
||||||
{
|
|
||||||
indices.Add(i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (indices.Count == 0)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (indices.Count == 1)
|
|
||||||
{
|
|
||||||
HighlightMovie(indices[0]);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Prefer tas files
|
|
||||||
var tas = new List<int>();
|
|
||||||
for (var i = 0; i < indices.Count; i++)
|
|
||||||
{
|
|
||||||
foreach (var ext in MovieService.MovieExtensions)
|
|
||||||
{
|
|
||||||
if (Path.GetExtension(_movieList[indices[i]].Filename).ToUpper() == "." + ext)
|
|
||||||
{
|
|
||||||
tas.Add(i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (tas.Count == 1)
|
|
||||||
{
|
|
||||||
HighlightMovie(tas[0]);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (tas.Count > 1)
|
|
||||||
{
|
|
||||||
indices = new List<int>(tas);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Final tie breaker - Last used file
|
|
||||||
var file = new FileInfo(_movieList[indices[0]].Filename);
|
|
||||||
var time = file.LastAccessTime;
|
|
||||||
var mostRecent = indices.First();
|
|
||||||
for (var i = 1; i < indices.Count; i++)
|
|
||||||
{
|
|
||||||
file = new FileInfo(_movieList[indices[0]].Filename);
|
|
||||||
if (file.LastAccessTime > time)
|
|
||||||
{
|
|
||||||
time = file.LastAccessTime;
|
|
||||||
mostRecent = indices[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
HighlightMovie(mostRecent);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void HighlightMovie(int index)
|
|
||||||
{
|
|
||||||
MovieView.SelectedIndices.Clear();
|
|
||||||
MovieView.setSelection(index);
|
|
||||||
MovieView.SelectItem(index, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ScanFiles()
|
|
||||||
{
|
|
||||||
_movieList.Clear();
|
|
||||||
MovieView.ItemCount = 0;
|
|
||||||
MovieView.Update();
|
|
||||||
|
|
||||||
var directory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.MoviesPathFragment, null);
|
|
||||||
if (!Directory.Exists(directory))
|
|
||||||
{
|
|
||||||
Directory.CreateDirectory(directory);
|
|
||||||
}
|
|
||||||
|
|
||||||
var dpTodo = new Queue<string>();
|
|
||||||
var fpTodo = new List<string>();
|
|
||||||
dpTodo.Enqueue(directory);
|
|
||||||
Dictionary<string, int> ordinals = new Dictionary<string, int>();
|
|
||||||
|
|
||||||
while (dpTodo.Count > 0)
|
|
||||||
{
|
|
||||||
string dp = dpTodo.Dequeue();
|
|
||||||
|
|
||||||
//enqueue subdirectories if appropriate
|
|
||||||
if (Global.Config.PlayMovie_IncludeSubdir)
|
|
||||||
foreach(var subdir in Directory.GetDirectories(dp))
|
|
||||||
dpTodo.Enqueue(subdir);
|
|
||||||
|
|
||||||
//add movies
|
|
||||||
fpTodo.AddRange(Directory.GetFiles(dp, "*." + MovieService.DefaultExtension));
|
|
||||||
fpTodo.AddRange(Directory.GetFiles(dp, "*." + TasMovie.Extension));
|
|
||||||
}
|
|
||||||
|
|
||||||
//in parallel, scan each movie
|
|
||||||
Parallel.For(0, fpTodo.Count, (i) =>
|
|
||||||
//for(int i=0;i<fpTodo.Count;i++)
|
|
||||||
{
|
|
||||||
var file = fpTodo[i];
|
|
||||||
lock(ordinals) ordinals[file] = i;
|
|
||||||
AddMovieToList(file, force: false);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
//sort by the ordinal key to maintain relatively stable results when rescanning
|
|
||||||
_movieList.Sort((a, b) => ordinals[a.Filename].CompareTo(ordinals[b.Filename]));
|
|
||||||
|
|
||||||
RefreshMovieList();
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Events
|
|
||||||
|
|
||||||
#region Movie List
|
|
||||||
|
|
||||||
void RefreshMovieList()
|
|
||||||
{
|
|
||||||
MovieView.ItemCount = _movieList.Count;
|
|
||||||
UpdateList();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void MovieView_DragEnter(object sender, DragEventArgs e)
|
|
||||||
{
|
|
||||||
e.Effect = e.Data.GetDataPresent(DataFormats.FileDrop) ? DragDropEffects.Copy : DragDropEffects.None;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void MovieView_DragDrop(object sender, DragEventArgs e)
|
|
||||||
{
|
|
||||||
var filePaths = (string[])e.Data.GetData(DataFormats.FileDrop);
|
|
||||||
|
|
||||||
foreach (var path in filePaths.Where(path => MovieService.MovieExtensions.Contains(Path.GetExtension(path).Replace(".", ""))))
|
|
||||||
{
|
|
||||||
AddMovieToList(path, force: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
RefreshMovieList();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void MovieView_KeyDown(object sender, KeyEventArgs e)
|
|
||||||
{
|
|
||||||
if (e.Control && e.KeyCode == Keys.C)
|
|
||||||
{
|
|
||||||
var indexes = MovieView.SelectedIndices;
|
|
||||||
if (indexes.Count > 0)
|
|
||||||
{
|
|
||||||
var copyStr = new StringBuilder();
|
|
||||||
foreach (int index in indexes)
|
|
||||||
{
|
|
||||||
copyStr
|
|
||||||
.Append(_movieList[index].Filename).Append('\t')
|
|
||||||
.Append(_movieList[index].SystemID).Append('\t')
|
|
||||||
.Append(_movieList[index].GameName).Append('\t')
|
|
||||||
.Append(PlatformFrameRates.MovieTime(_movieList[index]).ToString(@"hh\:mm\:ss\.fff"))
|
|
||||||
.AppendLine();
|
|
||||||
}
|
|
||||||
Clipboard.SetDataObject(copyStr.ToString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void MovieView_DoubleClick(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
Run();
|
|
||||||
Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void MovieView_ColumnClick(object sender, ColumnClickEventArgs e)
|
|
||||||
{
|
|
||||||
var columnName = MovieView.Columns[e.Column].Text;
|
|
||||||
switch (columnName)
|
|
||||||
{
|
|
||||||
case "File":
|
|
||||||
default:
|
|
||||||
_movieList = _movieList.OrderBy(x => Path.GetFileName(x.Filename))
|
|
||||||
.ThenBy(x => x.SystemID)
|
|
||||||
.ThenBy(x => x.GameName)
|
|
||||||
.ThenBy(x => x.FrameCount)
|
|
||||||
.ToList();
|
|
||||||
break;
|
|
||||||
case "SysID":
|
|
||||||
_movieList = _movieList.OrderBy(x => x.SystemID)
|
|
||||||
.ThenBy(x => Path.GetFileName(x.Filename))
|
|
||||||
.ThenBy(x => x.GameName)
|
|
||||||
.ThenBy(x => x.FrameCount)
|
|
||||||
.ToList();
|
|
||||||
break;
|
|
||||||
case "Game":
|
|
||||||
_movieList = _movieList.OrderBy(x => x.GameName)
|
|
||||||
.ThenBy(x => Path.GetFileName(x.Filename))
|
|
||||||
.ThenBy(x => x.SystemID)
|
|
||||||
.ThenBy(x => x.FrameCount)
|
|
||||||
.ToList();
|
|
||||||
break;
|
|
||||||
case "Length (est.)":
|
|
||||||
_movieList = _movieList.OrderBy(x => x.FrameCount)
|
|
||||||
.ThenBy(x => Path.GetFileName(x.Filename))
|
|
||||||
.ThenBy(x => x.SystemID)
|
|
||||||
.ThenBy(x => x.GameName)
|
|
||||||
.ToList();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (_sortedCol == columnName && _sortReverse)
|
|
||||||
{
|
|
||||||
_movieList.Reverse();
|
|
||||||
_sortReverse = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_sortReverse = true;
|
|
||||||
_sortedCol = columnName;
|
|
||||||
}
|
|
||||||
MovieView.Refresh();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void MovieView_SelectedIndexChanged(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
toolTip1.SetToolTip(DetailsView, "");
|
|
||||||
DetailsView.Items.Clear();
|
|
||||||
if (MovieView.SelectedIndices.Count < 1)
|
|
||||||
{
|
|
||||||
OK.Enabled = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
OK.Enabled = true;
|
|
||||||
|
|
||||||
var firstIndex = MovieView.SelectedIndices[0];
|
|
||||||
MovieView.ensureVisible(firstIndex);
|
|
||||||
|
|
||||||
foreach (var kvp in _movieList[firstIndex].HeaderEntries)
|
|
||||||
{
|
|
||||||
var item = new ListViewItem(kvp.Key);
|
|
||||||
item.SubItems.Add(kvp.Value);
|
|
||||||
|
|
||||||
bool add = true;
|
|
||||||
|
|
||||||
switch (kvp.Key)
|
|
||||||
{
|
|
||||||
case HeaderKeys.SHA1:
|
|
||||||
if (kvp.Value != Global.Game.Hash)
|
|
||||||
{
|
|
||||||
item.BackColor = Color.Pink;
|
|
||||||
toolTip1.SetToolTip(DetailsView, "Current SHA1: " + Global.Game.Hash);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
// TODO
|
|
||||||
//case HeaderKeys.EMULATIONVERSION:
|
|
||||||
// if (kvp.Value != VersionInfo.GetEmuVersion())
|
|
||||||
// {
|
|
||||||
// item.BackColor = Color.Yellow;
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
case HeaderKeys.PLATFORM:
|
|
||||||
if (kvp.Value != Global.Game.System)
|
|
||||||
{
|
|
||||||
item.BackColor = Color.Pink;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(add)
|
|
||||||
DetailsView.Items.Add(item);
|
|
||||||
}
|
|
||||||
|
|
||||||
var FpsItem = new ListViewItem("Fps");
|
|
||||||
FpsItem.SubItems.Add($"{Fps(_movieList[firstIndex]):0.#######}");
|
|
||||||
DetailsView.Items.Add(FpsItem);
|
|
||||||
|
|
||||||
var FramesItem = new ListViewItem("Frames");
|
|
||||||
FramesItem.SubItems.Add(_movieList[firstIndex].FrameCount.ToString());
|
|
||||||
DetailsView.Items.Add(FramesItem);
|
|
||||||
CommentsBtn.Enabled = _movieList[firstIndex].Comments.Any();
|
|
||||||
SubtitlesBtn.Enabled = _movieList[firstIndex].Subtitles.Any();
|
|
||||||
}
|
|
||||||
|
|
||||||
public double Fps(IMovie movie)
|
|
||||||
{
|
|
||||||
var system = movie.HeaderEntries[HeaderKeys.PLATFORM];
|
|
||||||
var pal = movie.HeaderEntries.ContainsKey(HeaderKeys.PAL) &&
|
|
||||||
movie.HeaderEntries[HeaderKeys.PAL] == "1";
|
|
||||||
|
|
||||||
return new PlatformFrameRates()[system, pal];
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void EditMenuItem_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
foreach (var movie in MovieView.SelectedIndices.Cast<int>()
|
|
||||||
.Select(index => _movieList[index]))
|
|
||||||
{
|
|
||||||
System.Diagnostics.Process.Start(movie.Filename);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Details
|
|
||||||
|
|
||||||
private void DetailsView_ColumnClick(object sender, ColumnClickEventArgs e)
|
|
||||||
{
|
|
||||||
var detailsList = new List<MovieDetails>();
|
|
||||||
for (var i = 0; i < DetailsView.Items.Count; i++)
|
|
||||||
{
|
|
||||||
detailsList.Add(new MovieDetails
|
|
||||||
{
|
|
||||||
Keys = DetailsView.Items[i].Text,
|
|
||||||
Values = DetailsView.Items[i].SubItems[1].Text,
|
|
||||||
BackgroundColor = DetailsView.Items[i].BackColor
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
var columnName = DetailsView.Columns[e.Column].Text;
|
|
||||||
if (_sortedDetailsCol != columnName)
|
|
||||||
{
|
|
||||||
_sortDetailsReverse = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (columnName)
|
|
||||||
{
|
|
||||||
// Header, Value
|
|
||||||
case "Header":
|
|
||||||
if (_sortDetailsReverse)
|
|
||||||
{
|
|
||||||
detailsList = detailsList
|
|
||||||
.OrderByDescending(x => x.Keys)
|
|
||||||
.ThenBy(x => x.Values).ToList();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
detailsList = detailsList
|
|
||||||
.OrderBy(x => x.Keys)
|
|
||||||
.ThenBy(x => x.Values).ToList();
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
case "Value":
|
|
||||||
if (_sortDetailsReverse)
|
|
||||||
{
|
|
||||||
detailsList = detailsList
|
|
||||||
.OrderByDescending(x => x.Values)
|
|
||||||
.ThenBy(x => x.Keys).ToList();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
detailsList = detailsList
|
|
||||||
.OrderBy(x => x.Values)
|
|
||||||
.ThenBy(x => x.Keys).ToList();
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
DetailsView.Items.Clear();
|
|
||||||
foreach (var detail in detailsList)
|
|
||||||
{
|
|
||||||
var item = new ListViewItem { Text = detail.Keys, BackColor = detail.BackgroundColor };
|
|
||||||
item.SubItems.Add(detail.Values);
|
|
||||||
DetailsView.Items.Add(item);
|
|
||||||
}
|
|
||||||
|
|
||||||
_sortedDetailsCol = columnName;
|
|
||||||
_sortDetailsReverse = !_sortDetailsReverse;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CommentsBtn_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
var indices = MovieView.SelectedIndices;
|
|
||||||
if (indices.Count > 0)
|
|
||||||
{
|
|
||||||
var form = new EditCommentsForm();
|
|
||||||
form.GetMovie(_movieList[MovieView.SelectedIndices[0]]);
|
|
||||||
form.Show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SubtitlesBtn_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
var indices = MovieView.SelectedIndices;
|
|
||||||
if (indices.Count > 0)
|
|
||||||
{
|
|
||||||
var s = new EditSubtitlesForm { ReadOnly = true };
|
|
||||||
s.GetMovie(_movieList[MovieView.SelectedIndices[0]]);
|
|
||||||
s.Show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Misc Widgets
|
|
||||||
|
|
||||||
private void BrowseMovies_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
var ofd = new OpenFileDialog
|
|
||||||
{
|
|
||||||
Filter = "Movie Files (*." + MovieService.DefaultExtension + ")|*." + MovieService.DefaultExtension +
|
|
||||||
"|TAS project Files (*." + TasMovie.Extension + ")|*." + TasMovie.Extension +
|
|
||||||
"|All Files|*.*",
|
|
||||||
InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.MoviesPathFragment, null)
|
|
||||||
};
|
|
||||||
|
|
||||||
var result = ofd.ShowDialog();
|
|
||||||
if (result == DialogResult.OK)
|
|
||||||
{
|
|
||||||
var file = new FileInfo(ofd.FileName);
|
|
||||||
if (!file.Exists)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
int? index = AddMovieToList(ofd.FileName, true);
|
|
||||||
RefreshMovieList();
|
|
||||||
if (index.HasValue)
|
|
||||||
{
|
|
||||||
MovieView.SelectedIndices.Clear();
|
|
||||||
MovieView.setSelection(index.Value);
|
|
||||||
MovieView.SelectItem(index.Value, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Scan_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
ScanFiles();
|
|
||||||
PreHighlightMovie();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void IncludeSubDirectories_CheckedChanged(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
Global.Config.PlayMovie_IncludeSubdir = IncludeSubDirectories.Checked;
|
|
||||||
ScanFiles();
|
|
||||||
PreHighlightMovie();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void MatchHashCheckBox_CheckedChanged(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
Global.Config.PlayMovie_MatchHash = MatchHashCheckBox.Checked;
|
|
||||||
ScanFiles();
|
|
||||||
PreHighlightMovie();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Ok_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
Global.Config.TurboSeek = TurboCheckbox.Checked;
|
|
||||||
Run();
|
|
||||||
Global.MovieSession.ReadOnly = ReadOnlyCheckBox.Checked;
|
|
||||||
|
|
||||||
if (StopOnFrameCheckbox.Checked &&
|
|
||||||
(StopOnFrameTextBox.ToRawInt().HasValue || LastFrameCheckbox.Checked))
|
|
||||||
{
|
|
||||||
if (LastFrameCheckbox.Checked)
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
//GlobalWin.MainForm.PauseOnFrame = Global.MovieSession.Movie.InputLogLength;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//GlobalWin.MainForm.PauseOnFrame = StopOnFrameTextBox.ToRawInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Cancel_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
private bool _programmaticallyChangingStopFrameCheckbox = false;
|
|
||||||
private void StopOnFrameCheckbox_CheckedChanged(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (!_programmaticallyChangingStopFrameCheckbox)
|
|
||||||
{
|
|
||||||
StopOnFrameTextBox.Focus();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void StopOnFrameTextBox_TextChanged_1(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
_programmaticallyChangingStopFrameCheckbox = true;
|
|
||||||
StopOnFrameCheckbox.Checked = !string.IsNullOrWhiteSpace(StopOnFrameTextBox.Text);
|
|
||||||
_programmaticallyChangingStopFrameCheckbox = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void LastFrameCheckbox_CheckedChanged(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (LastFrameCheckbox.Checked == true)
|
|
||||||
{
|
|
||||||
_programmaticallyChangingStopFrameCheckbox = true;
|
|
||||||
StopOnFrameCheckbox.Checked = true;
|
|
||||||
_programmaticallyChangingStopFrameCheckbox = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
StopOnFrameTextBox.Enabled = !LastFrameCheckbox.Checked;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,155 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<root>
|
|
||||||
<!--
|
|
||||||
Microsoft ResX Schema
|
|
||||||
|
|
||||||
Version 2.0
|
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
|
||||||
that is mostly human readable. The generation and parsing of the
|
|
||||||
various data types are done through the TypeConverter classes
|
|
||||||
associated with the data types.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
|
||||||
<resheader name="version">2.0</resheader>
|
|
||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
|
||||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
|
||||||
</data>
|
|
||||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
|
||||||
<comment>This is a comment</comment>
|
|
||||||
</data>
|
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
|
||||||
name/value pairs.
|
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
|
||||||
text/value conversion through the TypeConverter architecture.
|
|
||||||
Classes that don't support this are serialized and stored with the
|
|
||||||
mimetype set.
|
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
|
||||||
read any of the formats listed below.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
|
||||||
value : The object must be serialized into a byte array
|
|
||||||
: using a System.ComponentModel.TypeConverter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
-->
|
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
|
||||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:choice maxOccurs="unbounded">
|
|
||||||
<xsd:element name="metadata">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="assembly">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:attribute name="alias" type="xsd:string" />
|
|
||||||
<xsd:attribute name="name" type="xsd:string" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="data">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="resheader">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:choice>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:schema>
|
|
||||||
<resheader name="resmimetype">
|
|
||||||
<value>text/microsoft-resx</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="version">
|
|
||||||
<value>2.0</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="reader">
|
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="writer">
|
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
|
||||||
<value>17, 17</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
|
||||||
<value>114, 17</value>
|
|
||||||
</metadata>
|
|
||||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
|
||||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>
|
|
||||||
AAABAAEAEBAAAAAAAABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAQAEAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAA////AP64aABQUFAAwNjwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAMDAAMDAwAAAAAAAAAAAAMCAgMDAwMDAwAAAAMDAAADAgICAwMDAwMDAwMCAgMAAAMCAwMD
|
|
||||||
AwMDAwMDAgIDAAMEBAQDAgMDAwMDAwICAgMDBAQEAwICAwQDAwQDAgIDAAMDAwICAgMCAgIDAwMDAAAA
|
|
||||||
AwICAgMCAgIDAgMAAAAAAAAAAwMEBAQEBAQCAwAAAAAAAwMEBAQDAwMDAwMAAAAAAwQEAwMEBAMEBAQC
|
|
||||||
AwAAAAMEBAMDBAMEBAQEAgMAAAAAAwMDBAQDBAMDAwIDAAAAAAMCAgICAgICAgMEBAMAAAAAAwICAgIC
|
|
||||||
AwMEBAQDAAAAAAADAwMDAwAAAwMDAJH/AAAAcwAAAAEAAIABAAAAAAAAAAAAAIABAADABwAA8AMAAOAD
|
|
||||||
AADAAQAAwAEAAOABAADgAAAA8AAAAPgxAAA=
|
|
||||||
</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
|
|
@ -1,210 +0,0 @@
|
||||||
namespace BizHawk.Client.MultiHawk
|
|
||||||
{
|
|
||||||
partial class RecordMovie
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Required designer variable.
|
|
||||||
/// </summary>
|
|
||||||
private System.ComponentModel.IContainer components = null;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Clean up any resources being used.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
|
||||||
protected override void Dispose(bool disposing)
|
|
||||||
{
|
|
||||||
if (disposing && (components != null))
|
|
||||||
{
|
|
||||||
components.Dispose();
|
|
||||||
}
|
|
||||||
base.Dispose(disposing);
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Windows Form Designer generated code
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Required method for Designer support - do not modify
|
|
||||||
/// the contents of this method with the code editor.
|
|
||||||
/// </summary>
|
|
||||||
private void InitializeComponent()
|
|
||||||
{
|
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RecordMovie));
|
|
||||||
this.Cancel = new System.Windows.Forms.Button();
|
|
||||||
this.OK = new System.Windows.Forms.Button();
|
|
||||||
this.BrowseBtn = new System.Windows.Forms.Button();
|
|
||||||
this.RecordBox = new System.Windows.Forms.TextBox();
|
|
||||||
this.StartFromCombo = new System.Windows.Forms.ComboBox();
|
|
||||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
|
||||||
this.DefaultAuthorCheckBox = new System.Windows.Forms.CheckBox();
|
|
||||||
this.AuthorBox = new System.Windows.Forms.TextBox();
|
|
||||||
this.label3 = new System.Windows.Forms.Label();
|
|
||||||
this.label2 = new System.Windows.Forms.Label();
|
|
||||||
this.label1 = new System.Windows.Forms.Label();
|
|
||||||
this.groupBox1.SuspendLayout();
|
|
||||||
this.SuspendLayout();
|
|
||||||
//
|
|
||||||
// Cancel
|
|
||||||
//
|
|
||||||
this.Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
|
||||||
this.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
|
||||||
this.Cancel.Location = new System.Drawing.Point(391, 139);
|
|
||||||
this.Cancel.Name = "Cancel";
|
|
||||||
this.Cancel.Size = new System.Drawing.Size(75, 23);
|
|
||||||
this.Cancel.TabIndex = 1;
|
|
||||||
this.Cancel.Text = "&Cancel";
|
|
||||||
this.Cancel.UseVisualStyleBackColor = true;
|
|
||||||
this.Cancel.Click += new System.EventHandler(this.Cancel_Click);
|
|
||||||
//
|
|
||||||
// OK
|
|
||||||
//
|
|
||||||
this.OK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
|
||||||
this.OK.Location = new System.Drawing.Point(310, 139);
|
|
||||||
this.OK.Name = "OK";
|
|
||||||
this.OK.Size = new System.Drawing.Size(75, 23);
|
|
||||||
this.OK.TabIndex = 0;
|
|
||||||
this.OK.Text = "&OK";
|
|
||||||
this.OK.UseVisualStyleBackColor = true;
|
|
||||||
this.OK.Click += new System.EventHandler(this.Ok_Click);
|
|
||||||
//
|
|
||||||
// BrowseBtn
|
|
||||||
//
|
|
||||||
this.BrowseBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
|
||||||
this.BrowseBtn.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.OpenFile;
|
|
||||||
this.BrowseBtn.Location = new System.Drawing.Point(423, 13);
|
|
||||||
this.BrowseBtn.Name = "BrowseBtn";
|
|
||||||
this.BrowseBtn.Size = new System.Drawing.Size(25, 23);
|
|
||||||
this.BrowseBtn.TabIndex = 1;
|
|
||||||
this.BrowseBtn.UseVisualStyleBackColor = true;
|
|
||||||
this.BrowseBtn.Click += new System.EventHandler(this.BrowseBtn_Click);
|
|
||||||
//
|
|
||||||
// RecordBox
|
|
||||||
//
|
|
||||||
this.RecordBox.AllowDrop = true;
|
|
||||||
this.RecordBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
|
||||||
this.RecordBox.Location = new System.Drawing.Point(83, 13);
|
|
||||||
this.RecordBox.Name = "RecordBox";
|
|
||||||
this.RecordBox.Size = new System.Drawing.Size(334, 20);
|
|
||||||
this.RecordBox.TabIndex = 0;
|
|
||||||
this.RecordBox.DragDrop += new System.Windows.Forms.DragEventHandler(this.RecordBox_DragDrop);
|
|
||||||
this.RecordBox.DragEnter += new System.Windows.Forms.DragEventHandler(this.RecordBox_DragEnter);
|
|
||||||
//
|
|
||||||
// StartFromCombo
|
|
||||||
//
|
|
||||||
this.StartFromCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
|
||||||
this.StartFromCombo.Enabled = false;
|
|
||||||
this.StartFromCombo.FormattingEnabled = true;
|
|
||||||
this.StartFromCombo.Items.AddRange(new object[] {
|
|
||||||
"Power-On"});
|
|
||||||
this.StartFromCombo.Location = new System.Drawing.Point(83, 65);
|
|
||||||
this.StartFromCombo.MaxDropDownItems = 32;
|
|
||||||
this.StartFromCombo.Name = "StartFromCombo";
|
|
||||||
this.StartFromCombo.Size = new System.Drawing.Size(152, 21);
|
|
||||||
this.StartFromCombo.TabIndex = 3;
|
|
||||||
//
|
|
||||||
// groupBox1
|
|
||||||
//
|
|
||||||
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
|
||||||
this.groupBox1.Controls.Add(this.DefaultAuthorCheckBox);
|
|
||||||
this.groupBox1.Controls.Add(this.AuthorBox);
|
|
||||||
this.groupBox1.Controls.Add(this.StartFromCombo);
|
|
||||||
this.groupBox1.Controls.Add(this.BrowseBtn);
|
|
||||||
this.groupBox1.Controls.Add(this.label3);
|
|
||||||
this.groupBox1.Controls.Add(this.label2);
|
|
||||||
this.groupBox1.Controls.Add(this.label1);
|
|
||||||
this.groupBox1.Controls.Add(this.RecordBox);
|
|
||||||
this.groupBox1.Location = new System.Drawing.Point(12, 12);
|
|
||||||
this.groupBox1.Name = "groupBox1";
|
|
||||||
this.groupBox1.Size = new System.Drawing.Size(454, 112);
|
|
||||||
this.groupBox1.TabIndex = 0;
|
|
||||||
this.groupBox1.TabStop = false;
|
|
||||||
//
|
|
||||||
// DefaultAuthorCheckBox
|
|
||||||
//
|
|
||||||
this.DefaultAuthorCheckBox.Anchor = System.Windows.Forms.AnchorStyles.Right;
|
|
||||||
this.DefaultAuthorCheckBox.AutoSize = true;
|
|
||||||
this.DefaultAuthorCheckBox.Location = new System.Drawing.Point(327, 64);
|
|
||||||
this.DefaultAuthorCheckBox.Name = "DefaultAuthorCheckBox";
|
|
||||||
this.DefaultAuthorCheckBox.Size = new System.Drawing.Size(121, 17);
|
|
||||||
this.DefaultAuthorCheckBox.TabIndex = 6;
|
|
||||||
this.DefaultAuthorCheckBox.Text = "Make default author";
|
|
||||||
this.DefaultAuthorCheckBox.UseVisualStyleBackColor = true;
|
|
||||||
//
|
|
||||||
// AuthorBox
|
|
||||||
//
|
|
||||||
this.AuthorBox.AllowDrop = true;
|
|
||||||
this.AuthorBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
|
||||||
this.AuthorBox.Location = new System.Drawing.Point(83, 39);
|
|
||||||
this.AuthorBox.Name = "AuthorBox";
|
|
||||||
this.AuthorBox.Size = new System.Drawing.Size(365, 20);
|
|
||||||
this.AuthorBox.TabIndex = 2;
|
|
||||||
//
|
|
||||||
// label3
|
|
||||||
//
|
|
||||||
this.label3.AutoSize = true;
|
|
||||||
this.label3.Location = new System.Drawing.Point(36, 41);
|
|
||||||
this.label3.Name = "label3";
|
|
||||||
this.label3.Size = new System.Drawing.Size(41, 13);
|
|
||||||
this.label3.TabIndex = 2;
|
|
||||||
this.label3.Text = "Author:";
|
|
||||||
//
|
|
||||||
// label2
|
|
||||||
//
|
|
||||||
this.label2.AutoSize = true;
|
|
||||||
this.label2.Location = new System.Drawing.Point(6, 68);
|
|
||||||
this.label2.Name = "label2";
|
|
||||||
this.label2.Size = new System.Drawing.Size(71, 13);
|
|
||||||
this.label2.TabIndex = 5;
|
|
||||||
this.label2.Text = "Record From:";
|
|
||||||
//
|
|
||||||
// label1
|
|
||||||
//
|
|
||||||
this.label1.AutoSize = true;
|
|
||||||
this.label1.Location = new System.Drawing.Point(51, 16);
|
|
||||||
this.label1.Name = "label1";
|
|
||||||
this.label1.Size = new System.Drawing.Size(26, 13);
|
|
||||||
this.label1.TabIndex = 4;
|
|
||||||
this.label1.Text = "File:";
|
|
||||||
//
|
|
||||||
// RecordMovie
|
|
||||||
//
|
|
||||||
this.AcceptButton = this.OK;
|
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
|
||||||
this.CancelButton = this.Cancel;
|
|
||||||
this.ClientSize = new System.Drawing.Size(478, 163);
|
|
||||||
this.Controls.Add(this.groupBox1);
|
|
||||||
this.Controls.Add(this.OK);
|
|
||||||
this.Controls.Add(this.Cancel);
|
|
||||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
|
||||||
this.MaximizeBox = false;
|
|
||||||
this.MaximumSize = new System.Drawing.Size(1440, 201);
|
|
||||||
this.MinimizeBox = false;
|
|
||||||
this.MinimumSize = new System.Drawing.Size(425, 201);
|
|
||||||
this.Name = "RecordMovie";
|
|
||||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
|
||||||
this.Text = "Record Movie";
|
|
||||||
this.Load += new System.EventHandler(this.RecordMovie_Load);
|
|
||||||
this.groupBox1.ResumeLayout(false);
|
|
||||||
this.groupBox1.PerformLayout();
|
|
||||||
this.ResumeLayout(false);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
private System.Windows.Forms.Button Cancel;
|
|
||||||
private System.Windows.Forms.Button OK;
|
|
||||||
private System.Windows.Forms.Button BrowseBtn;
|
|
||||||
private System.Windows.Forms.TextBox RecordBox;
|
|
||||||
private System.Windows.Forms.ComboBox StartFromCombo;
|
|
||||||
private System.Windows.Forms.GroupBox groupBox1;
|
|
||||||
private System.Windows.Forms.Label label3;
|
|
||||||
private System.Windows.Forms.Label label2;
|
|
||||||
private System.Windows.Forms.Label label1;
|
|
||||||
private System.Windows.Forms.TextBox AuthorBox;
|
|
||||||
private System.Windows.Forms.CheckBox DefaultAuthorCheckBox;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,179 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.IO;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
using BizHawk.Common.ReflectionExtensions;
|
|
||||||
using BizHawk.Emulation.Common;
|
|
||||||
using BizHawk.Emulation.Common.IEmulatorExtensions;
|
|
||||||
using BizHawk.Client.Common;
|
|
||||||
using BizHawk.Client.Common.MovieConversionExtensions;
|
|
||||||
|
|
||||||
namespace BizHawk.Client.MultiHawk
|
|
||||||
{
|
|
||||||
public partial class RecordMovie : Form
|
|
||||||
{
|
|
||||||
private IEmulator Emulator;
|
|
||||||
|
|
||||||
// TODO - Allow relative paths in record textbox
|
|
||||||
public RecordMovie(IEmulator core)
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
|
|
||||||
Emulator = core;
|
|
||||||
|
|
||||||
if (!Emulator.HasSavestates())
|
|
||||||
{
|
|
||||||
StartFromCombo.Items.Remove(
|
|
||||||
StartFromCombo.Items
|
|
||||||
.OfType<object>()
|
|
||||||
.First(i => i.ToString()
|
|
||||||
.ToLower() == "now"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private string MakePath()
|
|
||||||
{
|
|
||||||
var path = RecordBox.Text;
|
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(path))
|
|
||||||
{
|
|
||||||
if (path.LastIndexOf(Path.DirectorySeparatorChar) == -1)
|
|
||||||
{
|
|
||||||
if (path[0] != Path.DirectorySeparatorChar)
|
|
||||||
{
|
|
||||||
path = path.Insert(0, Path.DirectorySeparatorChar.ToString());
|
|
||||||
}
|
|
||||||
|
|
||||||
path = PathManager.MakeAbsolutePath(Global.Config.PathEntries.MoviesPathFragment, null) + path;
|
|
||||||
|
|
||||||
if (!MovieService.MovieExtensions.Contains(Path.GetExtension(path)))
|
|
||||||
{
|
|
||||||
// If no valid movie extension, add movie extension
|
|
||||||
path += "." + MovieService.DefaultExtension;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return path;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Ok_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
var path = MakePath();
|
|
||||||
if (!string.IsNullOrWhiteSpace(path))
|
|
||||||
{
|
|
||||||
var test = new FileInfo(path);
|
|
||||||
if (test.Exists)
|
|
||||||
{
|
|
||||||
var result = MessageBox.Show(path + " already exists, overwrite?", "Confirm overwrite", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);
|
|
||||||
if (result == DialogResult.Cancel)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var movieToRecord = MovieService.Get(path);
|
|
||||||
|
|
||||||
var fileInfo = new FileInfo(path);
|
|
||||||
if (!fileInfo.Exists)
|
|
||||||
{
|
|
||||||
Directory.CreateDirectory(fileInfo.DirectoryName);
|
|
||||||
}
|
|
||||||
|
|
||||||
//if (StartFromCombo.SelectedItem.ToString() == "Now" && Emulator.HasSavestates())
|
|
||||||
//{
|
|
||||||
// var core = Emulator.AsStatable();
|
|
||||||
|
|
||||||
// movieToRecord.StartsFromSavestate = true;
|
|
||||||
|
|
||||||
// if (core.BinarySaveStatesPreferred)
|
|
||||||
// {
|
|
||||||
// movieToRecord.BinarySavestate = (byte[])core.SaveStateBinary().Clone();
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// using (var sw = new StringWriter())
|
|
||||||
// {
|
|
||||||
// core.SaveStateText(sw);
|
|
||||||
// movieToRecord.TextSavestate = sw.ToString();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// // TODO: do we want to support optionally not saving this?
|
|
||||||
// if (true)
|
|
||||||
// {
|
|
||||||
// // hack: some IMovies eat the framebuffer, so don't bother with them
|
|
||||||
// movieToRecord.SavestateFramebuffer = new int[0];
|
|
||||||
// if (movieToRecord.SavestateFramebuffer != null)
|
|
||||||
// {
|
|
||||||
|
|
||||||
// movieToRecord.SavestateFramebuffer = (int[])Emulator.VideoProvider().GetVideoBuffer().Clone();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
movieToRecord.PopulateWithDefaultHeaderValues(AuthorBox.Text);
|
|
||||||
movieToRecord.Save();
|
|
||||||
GlobalWin.MainForm.StartNewMovie(movieToRecord, true);
|
|
||||||
|
|
||||||
Global.Config.UseDefaultAuthor = DefaultAuthorCheckBox.Checked;
|
|
||||||
if (DefaultAuthorCheckBox.Checked)
|
|
||||||
{
|
|
||||||
Global.Config.DefaultAuthor = AuthorBox.Text;
|
|
||||||
}
|
|
||||||
|
|
||||||
Close();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MessageBox.Show("Please select a movie to record", "File selection error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Cancel_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void BrowseBtn_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
var sfd = new SaveFileDialog
|
|
||||||
{
|
|
||||||
InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.MoviesPathFragment, null),
|
|
||||||
DefaultExt = "." + Global.MovieSession.Movie.PreferredExtension,
|
|
||||||
FileName = RecordBox.Text,
|
|
||||||
OverwritePrompt = false,
|
|
||||||
Filter = "Movie Files (*." + Global.MovieSession.Movie.PreferredExtension + ")|*." + Global.MovieSession.Movie.PreferredExtension + "|All Files|*.*"
|
|
||||||
};
|
|
||||||
|
|
||||||
var result = sfd.ShowDialog();
|
|
||||||
if (result == DialogResult.OK
|
|
||||||
&& !string.IsNullOrWhiteSpace(sfd.FileName))
|
|
||||||
{
|
|
||||||
RecordBox.Text = sfd.FileName;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void RecordMovie_Load(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
RecordBox.Text = PathManager.FilesystemSafeName(GlobalWin.MainForm.EmulatorWindows.First().Game);
|
|
||||||
StartFromCombo.SelectedIndex = 0;
|
|
||||||
DefaultAuthorCheckBox.Checked = Global.Config.UseDefaultAuthor;
|
|
||||||
if (Global.Config.UseDefaultAuthor)
|
|
||||||
{
|
|
||||||
AuthorBox.Text = Global.Config.DefaultAuthor;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void RecordBox_DragEnter(object sender, DragEventArgs e)
|
|
||||||
{
|
|
||||||
e.Effect = e.Data.GetDataPresent(DataFormats.FileDrop) ? DragDropEffects.Copy : DragDropEffects.None;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void RecordBox_DragDrop(object sender, DragEventArgs e)
|
|
||||||
{
|
|
||||||
var filePaths = (string[])e.Data.GetData(DataFormats.FileDrop);
|
|
||||||
RecordBox.Text = filePaths[0];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,149 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<root>
|
|
||||||
<!--
|
|
||||||
Microsoft ResX Schema
|
|
||||||
|
|
||||||
Version 2.0
|
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
|
||||||
that is mostly human readable. The generation and parsing of the
|
|
||||||
various data types are done through the TypeConverter classes
|
|
||||||
associated with the data types.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
|
||||||
<resheader name="version">2.0</resheader>
|
|
||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
|
||||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
|
||||||
</data>
|
|
||||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
|
||||||
<comment>This is a comment</comment>
|
|
||||||
</data>
|
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
|
||||||
name/value pairs.
|
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
|
||||||
text/value conversion through the TypeConverter architecture.
|
|
||||||
Classes that don't support this are serialized and stored with the
|
|
||||||
mimetype set.
|
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
|
||||||
read any of the formats listed below.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
|
||||||
value : The object must be serialized into a byte array
|
|
||||||
: using a System.ComponentModel.TypeConverter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
-->
|
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
|
||||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:choice maxOccurs="unbounded">
|
|
||||||
<xsd:element name="metadata">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="assembly">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:attribute name="alias" type="xsd:string" />
|
|
||||||
<xsd:attribute name="name" type="xsd:string" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="data">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="resheader">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:choice>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:schema>
|
|
||||||
<resheader name="resmimetype">
|
|
||||||
<value>text/microsoft-resx</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="version">
|
|
||||||
<value>2.0</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="reader">
|
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="writer">
|
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
|
||||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>
|
|
||||||
AAABAAEAEBAAAAAAAABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAQAEAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAA////AP64aABQUFAAwNjwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAMDAAMDAwAAAAAAAAAAAAMCAgMDAwMDAwAAAAMDAAADAgICAwMDAwMDAwMCAgMAAAMCAwMD
|
|
||||||
AwMDAwMDAgIDAAMEBAQDAgMDAwMDAwICAgMDBAQEAwICAwQDAwQDAgIDAAMDAwICAgMCAgIDAwMDAAAA
|
|
||||||
AwICAgMCAgIDAgMAAAAAAAAAAwMEBAQEBAQCAwAAAAAAAwMEBAQDAwMDAwMAAAAAAwQEAwMEBAMEBAQC
|
|
||||||
AwAAAAMEBAMDBAMEBAQEAgMAAAAAAwMDBAQDBAMDAwIDAAAAAAMCAgICAgICAgMEBAMAAAAAAwICAgIC
|
|
||||||
AwMEBAQDAAAAAAADAwMDAwAAAwMDAJH/AAAAcwAAAAEAAIABAAAAAAAAAAAAAIABAADABwAA8AMAAOAD
|
|
||||||
AADAAQAAwAEAAOABAADgAAAA8AAAAPgxAAA=
|
|
||||||
</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
|
|
@ -55,8 +55,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BizHawk.Bizware.BizwareGL.G
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BizHawk.Bizware.BizwareGL.SlimDX", "Bizware\BizHawk.Bizware.BizwareGL.SlimDX\BizHawk.Bizware.BizwareGL.SlimDX.csproj", "{E6B436B1-A3CD-4C9A-8F76-5D7154726884}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BizHawk.Bizware.BizwareGL.SlimDX", "Bizware\BizHawk.Bizware.BizwareGL.SlimDX\BizHawk.Bizware.BizwareGL.SlimDX.csproj", "{E6B436B1-A3CD-4C9A-8F76-5D7154726884}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BizHawk.Client.MultiHawk", "BizHawk.Client.MultiHawk\BizHawk.Client.MultiHawk.csproj", "{B95649F5-A0AE-41EB-B62B-578A2AFF5E18}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BizHawk.Client.ApiHawk", "BizHawk.Client.ApiHawk\BizHawk.Client.ApiHawk.csproj", "{8E2F11F2-3955-4382-8C3A-CEBA1276CAEA}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BizHawk.Client.ApiHawk", "BizHawk.Client.ApiHawk\BizHawk.Client.ApiHawk.csproj", "{8E2F11F2-3955-4382-8C3A-CEBA1276CAEA}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
|
@ -117,10 +115,6 @@ Global
|
||||||
{E6B436B1-A3CD-4C9A-8F76-5D7154726884}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{E6B436B1-A3CD-4C9A-8F76-5D7154726884}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{E6B436B1-A3CD-4C9A-8F76-5D7154726884}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{E6B436B1-A3CD-4C9A-8F76-5D7154726884}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{E6B436B1-A3CD-4C9A-8F76-5D7154726884}.Release|Any CPU.Build.0 = Release|Any CPU
|
{E6B436B1-A3CD-4C9A-8F76-5D7154726884}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{B95649F5-A0AE-41EB-B62B-578A2AFF5E18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{B95649F5-A0AE-41EB-B62B-578A2AFF5E18}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{B95649F5-A0AE-41EB-B62B-578A2AFF5E18}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{B95649F5-A0AE-41EB-B62B-578A2AFF5E18}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{8E2F11F2-3955-4382-8C3A-CEBA1276CAEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{8E2F11F2-3955-4382-8C3A-CEBA1276CAEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{8E2F11F2-3955-4382-8C3A-CEBA1276CAEA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{8E2F11F2-3955-4382-8C3A-CEBA1276CAEA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{8E2F11F2-3955-4382-8C3A-CEBA1276CAEA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{8E2F11F2-3955-4382-8C3A-CEBA1276CAEA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
@ -141,7 +135,6 @@ Global
|
||||||
{2D2890A8-C338-4439-AD8B-CB9EE85A94F9} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA}
|
{2D2890A8-C338-4439-AD8B-CB9EE85A94F9} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA}
|
||||||
{337CA23E-65E7-44E1-9411-97EE08BB8116} = {0540A9A6-977E-466D-8BD3-1D8590BD5282}
|
{337CA23E-65E7-44E1-9411-97EE08BB8116} = {0540A9A6-977E-466D-8BD3-1D8590BD5282}
|
||||||
{E6B436B1-A3CD-4C9A-8F76-5D7154726884} = {0540A9A6-977E-466D-8BD3-1D8590BD5282}
|
{E6B436B1-A3CD-4C9A-8F76-5D7154726884} = {0540A9A6-977E-466D-8BD3-1D8590BD5282}
|
||||||
{B95649F5-A0AE-41EB-B62B-578A2AFF5E18} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA}
|
|
||||||
{8E2F11F2-3955-4382-8C3A-CEBA1276CAEA} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA}
|
{8E2F11F2-3955-4382-8C3A-CEBA1276CAEA} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
|