summaryrefslogtreecommitdiff
path: root/macosx/plugins/DFXVideo
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-10-23 21:38:13 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-10-23 21:38:13 +0000
commit0a342e0492ee88b43f63ec3e3a17c463fad2bf09 (patch)
tree506a58f4bc50634b2fb481786b2c963007901b8e /macosx/plugins/DFXVideo
parent0696bb38928d6652bc232055cd413579b352cc35 (diff)
downloadpcsxr-0a342e0492ee88b43f63ec3e3a17c463fad2bf09.tar.gz
Implement window size setting for PeopsSoftGL on OS X.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@87642 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/plugins/DFXVideo')
-rw-r--r--macosx/plugins/DFXVideo/English.lproj/NetSfPeopsSoftGPUConfig.xib97
-rwxr-xr-xmacosx/plugins/DFXVideo/macsrc/PluginConfigController.h2
-rwxr-xr-xmacosx/plugins/DFXVideo/macsrc/PluginConfigController.m41
-rwxr-xr-xmacosx/plugins/DFXVideo/macsrc/PluginGLView.m34
-rwxr-xr-xmacosx/plugins/DFXVideo/macsrc/PluginWindow.h3
-rwxr-xr-xmacosx/plugins/DFXVideo/macsrc/PluginWindowController.h9
-rwxr-xr-xmacosx/plugins/DFXVideo/macsrc/PluginWindowController.m4
7 files changed, 106 insertions, 84 deletions
diff --git a/macosx/plugins/DFXVideo/English.lproj/NetSfPeopsSoftGPUConfig.xib b/macosx/plugins/DFXVideo/English.lproj/NetSfPeopsSoftGPUConfig.xib
index 53f86024..bc764087 100644
--- a/macosx/plugins/DFXVideo/English.lproj/NetSfPeopsSoftGPUConfig.xib
+++ b/macosx/plugins/DFXVideo/English.lproj/NetSfPeopsSoftGPUConfig.xib
@@ -1,13 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4510" systemVersion="12F37" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4514" systemVersion="13A603" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment defaultVersion="1070" identifier="macosx"/>
- <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="4510"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="4514"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="NetSfPeopsSoftGPUPluginConfigController">
<connections>
<outlet property="autoFullScreen" destination="99" id="137"/>
+ <outlet property="displayHeight" destination="3eM-lr-W6U" id="Y6t-v6-0xn"/>
+ <outlet property="displayWidth" destination="4UQ-Uy-UYS" id="kZH-kE-kkC"/>
<outlet property="ditherMode" destination="116" id="143"/>
<outlet property="fpsCounter" destination="97" id="136"/>
<outlet property="fragmentChooser" destination="184" id="201"/>
@@ -30,22 +32,22 @@
<window title="GPU Configuration" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" wantsToBeColor="NO" visibleAtLaunch="NO" animationBehavior="default" id="5" userLabel="Window">
<windowStyleMask key="styleMask" titled="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
- <rect key="contentRect" x="411" y="163" width="466" height="564"/>
+ <rect key="contentRect" x="411" y="163" width="469" height="615"/>
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1058"/>
<value key="minSize" type="size" width="283.34100000000001" height="107"/>
<view key="contentView" id="6">
- <rect key="frame" x="0.0" y="0.0" width="466" height="564"/>
+ <rect key="frame" x="0.0" y="0.0" width="469" height="615"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<box title="Hacks" translatesAutoresizingMaskIntoConstraints="NO" id="76">
- <rect key="frame" x="17" y="190" width="432" height="217"/>
+ <rect key="frame" x="17" y="190" width="435" height="227"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView">
- <rect key="frame" x="2" y="2" width="428" height="200"/>
+ <rect key="frame" x="2" y="2" width="431" height="210"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="74">
- <rect key="frame" x="39" y="148" width="351" height="42"/>
+ <rect key="frame" x="41" y="158" width="350" height="42"/>
<autoresizingMask key="autoresizingMask"/>
<textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="center" id="162">
<font key="font" metaFont="smallSystem"/>
@@ -56,7 +58,7 @@ Hold the mouse over a checkbox to get more information about it.</string>
</textFieldCell>
</textField>
<matrix verticalHuggingPriority="750" mode="highlight" allowsEmptySelection="NO" autosizesCells="NO" translatesAutoresizingMaskIntoConstraints="NO" id="530">
- <rect key="frame" x="20" y="42" width="388" height="98"/>
+ <rect key="frame" x="22" y="52" width="388" height="98"/>
<autoresizingMask key="autoresizingMask"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
<size key="cellSize" width="192" height="18"/>
@@ -124,14 +126,14 @@ Hold the mouse over a checkbox to get more information about it.</string>
<color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</box>
<box title="Display Settings" translatesAutoresizingMaskIntoConstraints="NO" id="89">
- <rect key="frame" x="17" y="411" width="220" height="133"/>
+ <rect key="frame" x="17" y="421" width="223" height="174"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView">
- <rect key="frame" x="2" y="2" width="216" height="116"/>
+ <rect key="frame" x="2" y="2" width="219" height="157"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button hidden="YES" translatesAutoresizingMaskIntoConstraints="NO" id="93">
- <rect key="frame" x="18" y="30" width="173" height="18"/>
+ <rect key="frame" x="18" y="71" width="172" height="18"/>
<autoresizingMask key="autoresizingMask"/>
<string key="toolTip">Removes tearing artifacts by waiting for the monitor to sync. Will cause a slight performance loss. This setting has no effect on LCD monitors.</string>
<buttonCell key="cell" type="check" title="Sync to Monitor Refresh" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="172">
@@ -140,7 +142,7 @@ Hold the mouse over a checkbox to get more information about it.</string>
</buttonCell>
</button>
<button toolTip="Skip rendering frames to improve overall speed when needed. This setting might cause compatibility problems" translatesAutoresizingMaskIntoConstraints="NO" id="96">
- <rect key="frame" x="18" y="70" width="147" height="18"/>
+ <rect key="frame" x="18" y="111" width="146" height="18"/>
<autoresizingMask key="autoresizingMask"/>
<buttonCell key="cell" type="check" title="Use Frame Skipping" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="173">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
@@ -148,7 +150,7 @@ Hold the mouse over a checkbox to get more information about it.</string>
</buttonCell>
</button>
<button toolTip="When Enabled a small counter will show the current performance of the rendering measured in Frames Per Second (FPS)" translatesAutoresizingMaskIntoConstraints="NO" id="97">
- <rect key="frame" x="18" y="90" width="148" height="18"/>
+ <rect key="frame" x="18" y="131" width="148" height="18"/>
<autoresizingMask key="autoresizingMask"/>
<buttonCell key="cell" type="check" title="Display FPS Counter" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="174">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
@@ -156,13 +158,36 @@ Hold the mouse over a checkbox to get more information about it.</string>
</buttonCell>
</button>
<button hidden="YES" toolTip="Automatically enter full screen mode" translatesAutoresizingMaskIntoConstraints="NO" id="99">
- <rect key="frame" x="18" y="50" width="125" height="18"/>
+ <rect key="frame" x="18" y="91" width="125" height="18"/>
<autoresizingMask key="autoresizingMask"/>
<buttonCell key="cell" type="check" title="Auto Full Screen" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="175">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
</button>
+ <form verticalHuggingPriority="750" mode="track" allowsEmptySelection="NO" autosizesCells="NO" translatesAutoresizingMaskIntoConstraints="NO" id="l1k-Sq-djb">
+ <rect key="frame" x="52" y="13" width="116" height="52"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+ <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+ <size key="cellSize" width="116" height="22"/>
+ <size key="intercellSpacing" width="1" height="8"/>
+ <formCell key="prototype" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" alignment="justified" title="Field:" id="7gB-tB-Kx4">
+ <font key="font" metaFont="system"/>
+ <font key="titleFont" metaFont="system"/>
+ </formCell>
+ <cells>
+ <column>
+ <formCell scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" alignment="justified" title="Width:" id="4UQ-Uy-UYS">
+ <font key="font" metaFont="system"/>
+ <font key="titleFont" metaFont="system"/>
+ </formCell>
+ <formCell scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" alignment="justified" tag="1" title="Height:" id="3eM-lr-W6U">
+ <font key="font" metaFont="system"/>
+ <font key="titleFont" metaFont="system"/>
+ </formCell>
+ </column>
+ </cells>
+ </form>
</subviews>
</view>
<constraints>
@@ -174,19 +199,22 @@ Hold the mouse over a checkbox to get more information about it.</string>
<constraint firstItem="93" firstAttribute="top" secondItem="99" secondAttribute="bottom" constant="6" symbolic="YES" id="566"/>
<constraint firstItem="97" firstAttribute="top" secondItem="89" secondAttribute="top" constant="25" id="594"/>
<constraint firstItem="96" firstAttribute="top" secondItem="97" secondAttribute="bottom" constant="6" symbolic="YES" id="595"/>
+ <constraint firstAttribute="centerX" secondItem="l1k-Sq-djb" secondAttribute="centerX" id="1la-Ia-MfX"/>
+ <constraint firstItem="l1k-Sq-djb" firstAttribute="top" secondItem="93" secondAttribute="bottom" constant="8" symbolic="YES" id="KNB-Hl-xwX"/>
+ <constraint firstAttribute="bottom" secondItem="l1k-Sq-djb" secondAttribute="bottom" constant="11" id="a8O-DS-qIL"/>
</constraints>
<color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
<color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</box>
<box title="Rendering" translatesAutoresizingMaskIntoConstraints="NO" id="107">
- <rect key="frame" x="239" y="411" width="210" height="133"/>
+ <rect key="frame" x="242" y="421" width="210" height="174"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView">
- <rect key="frame" x="2" y="2" width="206" height="116"/>
+ <rect key="frame" x="2" y="2" width="206" height="157"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField toolTip="Specify when to use dithering to render colors" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="112">
- <rect key="frame" x="14" y="93" width="107" height="17"/>
+ <rect key="frame" x="15" y="134" width="106" height="17"/>
<autoresizingMask key="autoresizingMask"/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" title="Dither Graphics:" id="176">
<font key="font" metaFont="system"/>
@@ -195,7 +223,7 @@ Hold the mouse over a checkbox to get more information about it.</string>
</textFieldCell>
</textField>
<popUpButton toolTip="Specify when to use dithering to render colors" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="116">
- <rect key="frame" x="15" y="61" width="177" height="26"/>
+ <rect key="frame" x="15" y="102" width="177" height="26"/>
<autoresizingMask key="autoresizingMask"/>
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="clipping" borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter" preferredEdge="maxY" id="177">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
@@ -209,8 +237,8 @@ Hold the mouse over a checkbox to get more information about it.</string>
</menu>
</popUpButtonCell>
</popUpButton>
- <button toolTip="Enable use of the hacks specified below" translatesAutoresizingMaskIntoConstraints="NO" id="117">
- <rect key="frame" x="15" y="40" width="118" height="18"/>
+ <button toolTip="Enable use of the hacks specified below" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="117">
+ <rect key="frame" x="15" y="81" width="117" height="18"/>
<autoresizingMask key="autoresizingMask"/>
<buttonCell key="cell" type="check" title="Enable Hacks" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="178">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
@@ -221,7 +249,7 @@ Hold the mouse over a checkbox to get more information about it.</string>
</connections>
</button>
<button translatesAutoresizingMaskIntoConstraints="NO" id="180">
- <rect key="frame" x="15" y="20" width="118" height="18"/>
+ <rect key="frame" x="15" y="61" width="117" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="check" title="Enable Shaders" bezelStyle="regularSquare" imagePosition="left" inset="2" id="181">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
@@ -243,21 +271,20 @@ Hold the mouse over a checkbox to get more information about it.</string>
<constraint firstItem="117" firstAttribute="leading" secondItem="180" secondAttribute="leading" id="E8l-1O-t2W"/>
<constraint firstItem="117" firstAttribute="top" secondItem="116" secondAttribute="bottom" constant="8" symbolic="YES" id="edX-A9-gv2"/>
<constraint firstItem="117" firstAttribute="leading" secondItem="112" secondAttribute="leading" id="rCK-rd-Jyw"/>
- <constraint firstAttribute="bottom" secondItem="180" secondAttribute="bottom" constant="20" id="ttc-Yy-itN"/>
<constraint firstItem="117" firstAttribute="leading" secondItem="116" secondAttribute="leading" id="wDx-5p-e55"/>
</constraints>
<color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
<color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</box>
<box autoresizesSubviews="NO" title="Shaders" borderType="line" translatesAutoresizingMaskIntoConstraints="NO" id="179">
- <rect key="frame" x="17" y="57" width="432" height="129"/>
+ <rect key="frame" x="17" y="57" width="435" height="129"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<view key="contentView">
- <rect key="frame" x="1" y="1" width="430" height="113"/>
+ <rect key="frame" x="1" y="1" width="433" height="113"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button verticalHuggingPriority="750" tag="1" translatesAutoresizingMaskIntoConstraints="NO" id="182">
- <rect key="frame" x="333" y="75" width="89" height="32"/>
+ <rect key="frame" x="335" y="75" width="90" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="Select..." bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="183">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@@ -268,7 +295,7 @@ Hold the mouse over a checkbox to get more information about it.</string>
</connections>
</button>
<button verticalHuggingPriority="750" tag="2" translatesAutoresizingMaskIntoConstraints="NO" id="184">
- <rect key="frame" x="333" y="42" width="89" height="32"/>
+ <rect key="frame" x="335" y="42" width="90" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="Select..." bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="185">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@@ -279,7 +306,7 @@ Hold the mouse over a checkbox to get more information about it.</string>
</connections>
</button>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="186">
- <rect key="frame" x="85" y="85" width="249" height="17"/>
+ <rect key="frame" x="88" y="85" width="247" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<constraints>
<constraint firstAttribute="width" constant="243" id="255"/>
@@ -291,7 +318,7 @@ Hold the mouse over a checkbox to get more information about it.</string>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="188">
- <rect key="frame" x="85" y="52" width="249" height="17"/>
+ <rect key="frame" x="88" y="52" width="247" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Label" id="189">
<font key="font" metaFont="system"/>
@@ -300,7 +327,7 @@ Hold the mouse over a checkbox to get more information about it.</string>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="194">
- <rect key="frame" x="15" y="85" width="68" height="17"/>
+ <rect key="frame" x="16" y="85" width="68" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Vertex:" id="195">
<font key="font" metaFont="system"/>
@@ -309,7 +336,7 @@ Hold the mouse over a checkbox to get more information about it.</string>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="196">
- <rect key="frame" x="15" y="52" width="68" height="17"/>
+ <rect key="frame" x="16" y="52" width="68" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Fragment:" id="197">
<font key="font" metaFont="system"/>
@@ -318,7 +345,7 @@ Hold the mouse over a checkbox to get more information about it.</string>
</textFieldCell>
</textField>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="219">
- <rect key="frame" x="86" y="20" width="100" height="26"/>
+ <rect key="frame" x="88" y="20" width="100" height="26"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<constraints>
<constraint firstAttribute="width" constant="95" id="279"/>
@@ -343,7 +370,7 @@ Hold the mouse over a checkbox to get more information about it.</string>
</popUpButtonCell>
</popUpButton>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="225">
- <rect key="frame" x="15" y="26" width="68" height="17"/>
+ <rect key="frame" x="16" y="26" width="68" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Quality:" id="226">
<font key="font" metaFont="system"/>
@@ -380,7 +407,7 @@ Hold the mouse over a checkbox to get more information about it.</string>
<color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</box>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="371">
- <rect key="frame" x="393" y="13" width="59" height="32"/>
+ <rect key="frame" x="396" y="13" width="59" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="OK" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="372">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@@ -394,7 +421,7 @@ DQ
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="375">
- <rect key="frame" x="311" y="13" width="82" height="32"/>
+ <rect key="frame" x="314" y="13" width="82" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="376">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@@ -408,7 +435,7 @@ Gw
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="381">
- <rect key="frame" x="14" y="13" width="75" height="32"/>
+ <rect key="frame" x="14" y="13" width="74" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="Reset" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="382">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
diff --git a/macosx/plugins/DFXVideo/macsrc/PluginConfigController.h b/macosx/plugins/DFXVideo/macsrc/PluginConfigController.h
index e5b3aac0..ea8e10ff 100755
--- a/macosx/plugins/DFXVideo/macsrc/PluginConfigController.h
+++ b/macosx/plugins/DFXVideo/macsrc/PluginConfigController.h
@@ -30,6 +30,8 @@
@property (strong) NSURL *vertexPath;
@property (strong) NSURL *fragmentPath;
+@property (weak) IBOutlet NSFormCell *displayWidth;
+@property (weak) IBOutlet NSFormCell *displayHeight;
- (IBAction)cancel:(id)sender;
- (IBAction)ok:(id)sender;
diff --git a/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m b/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m
index 53cf1230..f7982d36 100755
--- a/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m
+++ b/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m
@@ -42,6 +42,8 @@ __private_extern__ char* PLUGLOC(char* toloc);
static PluginConfigController *windowController = nil;
+#define kWindowSize @"Window Size"
+
void AboutDlgProc()
{
// Get parent application instance
@@ -136,10 +138,28 @@ void ReadConfig(void)
@"VertexShader": [[selfBundle URLForResource:@"gpuPeteOGL2" withExtension:@"slv"] bookmarkDataWithOptions:NSURLBookmarkCreationPreferFileIDResolution includingResourceValuesForKeys:nil relativeToURL:nil error:nil],
@"FragmentShader": [[selfBundle URLForResource:@"gpuPeteOGL2" withExtension:@"slf"] bookmarkDataWithOptions:NSURLBookmarkCreationPreferFileIDResolution includingResourceValuesForKeys:nil relativeToURL:nil error:nil],
@"UseShader": @NO,
- @"ShaderQuality": @4}}];
+ @"ShaderQuality": @4,
+ kWindowSize: NSStringFromSize(NSMakeSize(640, 480))}}];
keyValues = [defaults dictionaryForKey:PrefsKey];
-
+ BOOL windowSizeNeedsReset = NO;
+ if (keyValues) {
+ NSSize size = NSSizeFromString(keyValues[kWindowSize]);
+ if (!keyValues[kWindowSize]) {
+ windowSizeNeedsReset = YES;
+ } else if ([keyValues[kWindowSize] isKindOfClass:[NSNumber class]]) {
+ windowSizeNeedsReset = YES;
+ } else if (size.height == 0 || size.width == 0) {
+ windowSizeNeedsReset = YES;
+ }
+ }
+ if (windowSizeNeedsReset) {
+ NSMutableDictionary *tmpDict = [[NSMutableDictionary alloc] initWithDictionary:keyValues];
+ tmpDict[kWindowSize] = NSStringFromSize(NSMakeSize(640, 480));
+ [defaults setObject:tmpDict forKey:PrefsKey];
+ [defaults synchronize];
+ }
+
iShowFPS = [keyValues[@"FPS Counter"] boolValue];
iWindowMode = [keyValues[@"Auto Full Screen"] boolValue] ? 0 : 1;
UseFrameSkip = [keyValues[@"Frame Skipping"] boolValue];
@@ -150,8 +170,10 @@ void ReadConfig(void)
iUseDither = [keyValues[@"Dither Mode"] intValue];
dwCfgFixes = [keyValues[@"Hacks"] unsignedIntValue];
- iResX = 640;
- iResY = 480;
+ NSSize windowSize = NSSizeFromString(keyValues[kWindowSize]);
+
+ iResX = windowSize.width;
+ iResY = windowSize.height;
iUseNoStretchBlt = 1;
fFrameRate = 60;
@@ -163,7 +185,8 @@ void ReadConfig(void)
ulKeybits &= ~KEY_SHOWFPS;
// additional checks
- if(!iColDepth) iColDepth = 32;
+ if(!iColDepth)
+ iColDepth = 32;
if(iUseFixes) {
dwActFixes = dwCfgFixes;
} else {
@@ -171,7 +194,8 @@ void ReadConfig(void)
}
SetFixes();
- if(iFrameLimit == 2) SetAutoFrameCap();
+ if(iFrameLimit == 2)
+ SetAutoFrameCap();
bSkipNextFrame = FALSE;
szDispBuf[0] = 0;
@@ -212,6 +236,7 @@ void ReadConfig(void)
writeDic[@"VertexShader"] = [vertexPath bookmarkDataWithOptions:NSURLBookmarkCreationPreferFileIDResolution includingResourceValuesForKeys:nil relativeToURL:nil error:nil];
writeDic[@"FragmentShader"] = [fragmentPath bookmarkDataWithOptions:NSURLBookmarkCreationPreferFileIDResolution includingResourceValuesForKeys:nil relativeToURL:nil error:nil];
+ writeDic[kWindowSize] = NSStringFromSize(NSMakeSize(self.displayWidth.integerValue, self.displayHeight.integerValue));
// write to defaults
[defaults setObject:writeDic forKey:PrefsKey];
@@ -295,6 +320,7 @@ void ReadConfig(void)
- (void)loadValues
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
+ NSSize theSize;
ReadConfig();
@@ -332,6 +358,9 @@ void ReadConfig(void)
for (NSCell *control in [hacksMatrix cells]) {
[control setIntValue:(hackValues >> ([control tag] - 1)) & 1];
}
+ theSize = NSSizeFromString(keyValues[kWindowSize]);
+ [self.displayWidth setIntegerValue:theSize.width];
+ [self.displayHeight setIntegerValue:theSize.height];
[self hackToggle:hackEnable];
[self toggleShader:shaders];
diff --git a/macosx/plugins/DFXVideo/macsrc/PluginGLView.m b/macosx/plugins/DFXVideo/macsrc/PluginGLView.m
index fee2eb54..09375671 100755
--- a/macosx/plugins/DFXVideo/macsrc/PluginGLView.m
+++ b/macosx/plugins/DFXVideo/macsrc/PluginGLView.m
@@ -309,15 +309,6 @@ void BlitScreen16NS(unsigned char * surf,long x,long y)
// Make this context current
[[self openGLContext] makeCurrentContext];
- // Loads the shaders
- //shader=LoadShader(GL_VERTEX_SHADER,"/Users/alexandremathieu/vertex.c");
- //program=glCreateProgram();
- //glAttachShader(program, shader);
- //glLinkProgram(program);
- //if(program == 0){
- // printf("Program invalide bourdel\n");
- //}
-
if (PSXDisplay.Disabled) {
glClear(GL_COLOR_BUFFER_BIT);
} else {
@@ -735,31 +726,6 @@ void BlitScreen16NS(unsigned char * surf,long x,long y)
// [self setNeedsDisplay:true];
}
}
-/*
-- (void)mouseDown:(NSEvent *)theEvent
-{
- PluginWindowController *controller = [[self window] windowController];
-
- static unsigned long lastTime = 0;
- unsigned long time;
-
- time = TickCount();
-
- if (lastTime != 0) {
- if (time - lastTime > GetDblTime()) {
- if (isFullscreen) {
- [[self openGLContext] clearDrawable];
- } else {
- [[self openGLContext] setFullScreen];
- }
- isFullscreen = 1-isFullscreen;
- lastTime = 0;
- return;
- }
- }
-
- lastTime = time;
-}*/
- (GLuint)loadShader:(GLenum)type location:(NSURL*)filename
{
diff --git a/macosx/plugins/DFXVideo/macsrc/PluginWindow.h b/macosx/plugins/DFXVideo/macsrc/PluginWindow.h
index 38a8dfa1..017579b2 100755
--- a/macosx/plugins/DFXVideo/macsrc/PluginWindow.h
+++ b/macosx/plugins/DFXVideo/macsrc/PluginWindow.h
@@ -19,6 +19,5 @@
#import <Cocoa/Cocoa.h>
@interface NetSfPeopsSoftGPUPluginWindow : NSWindow
-{
-}
+
@end
diff --git a/macosx/plugins/DFXVideo/macsrc/PluginWindowController.h b/macosx/plugins/DFXVideo/macsrc/PluginWindowController.h
index b8eccf4a..f149eb55 100755
--- a/macosx/plugins/DFXVideo/macsrc/PluginWindowController.h
+++ b/macosx/plugins/DFXVideo/macsrc/PluginWindowController.h
@@ -28,14 +28,13 @@ extern PluginWindowController *gameController;
@interface PluginWindowController : NSWindowController <NSWindowDelegate>
{
- IBOutlet NSOpenGLView *glView;
-
- NSWindow *fullWindow;
+ IBOutlet NSOpenGLView *glView;
+
+ NSWindow *fullWindow;
}
+@property BOOL fullscreen;
+ (id)openGameView;
- (PluginGLView *)openGLView;
-- (BOOL)fullscreen;
-- (void)setFullscreen:(BOOL)flag;
@end
diff --git a/macosx/plugins/DFXVideo/macsrc/PluginWindowController.m b/macosx/plugins/DFXVideo/macsrc/PluginWindowController.m
index 0ad6dd74..f0b45280 100755
--- a/macosx/plugins/DFXVideo/macsrc/PluginWindowController.m
+++ b/macosx/plugins/DFXVideo/macsrc/PluginWindowController.m
@@ -35,12 +35,12 @@ NSRect windowFrame;
}
gameWindow = [gameController window];
}
+ windowFrame = NSMakeRect(0, 0, iResX + 8, iResY + 4);
if (windowFrame.size.width != 0) {
[gameWindow setFrame:windowFrame display:NO];
- } else {
- [gameWindow center];
}
+ [gameWindow center];
[gameWindow makeKeyAndOrderFront:nil];
[gameController showWindow:nil];