summaryrefslogtreecommitdiff
path: root/win32/plugins/peopsxgl
diff options
context:
space:
mode:
Diffstat (limited to 'win32/plugins/peopsxgl')
-rwxr-xr-x[-rw-r--r--]win32/plugins/peopsxgl/gpuPeopsOpenGL.def72
-rwxr-xr-x[-rw-r--r--]win32/plugins/peopsxgl/gpuPeopsOpenGL.dev638
-rwxr-xr-x[-rw-r--r--]win32/plugins/peopsxgl/gpuPeopsOpenGL.dsp422
-rwxr-xr-x[-rw-r--r--]win32/plugins/peopsxgl/gpuPeopsOpenGL.rc1022
-rwxr-xr-x[-rw-r--r--]win32/plugins/peopsxgl/gpuPeopsOpenGL.vcproj1120
-rwxr-xr-x[-rw-r--r--]win32/plugins/peopsxgl/resource.h268
-rwxr-xr-x[-rw-r--r--]win32/plugins/peopsxgl/winsrc/cfg.c2082
-rwxr-xr-x[-rw-r--r--]win32/plugins/peopsxgl/winsrc/fps.c1282
-rwxr-xr-x[-rw-r--r--]win32/plugins/peopsxgl/winsrc/key.c406
-rwxr-xr-x[-rw-r--r--]win32/plugins/peopsxgl/winsrc/ssave.c130
-rwxr-xr-x[-rw-r--r--]win32/plugins/peopsxgl/winsrc/ssave.h56
-rwxr-xr-x[-rw-r--r--]win32/plugins/peopsxgl/winsrc/winmain.c84
12 files changed, 3791 insertions, 3791 deletions
diff --git a/win32/plugins/peopsxgl/gpuPeopsOpenGL.def b/win32/plugins/peopsxgl/gpuPeopsOpenGL.def
index ef8cc98d..17d2e66c 100644..100755
--- a/win32/plugins/peopsxgl/gpuPeopsOpenGL.def
+++ b/win32/plugins/peopsxgl/gpuPeopsOpenGL.def
@@ -1,36 +1,36 @@
-; gpuPeopsOpenGL.def : Declares the module parameters for the DLL.
-
-LIBRARY "gpuPeopsOpenGL"
-DESCRIPTION 'gpuPeopsOpenGL OpenGL Windows Dynamic Link Library'
-EXPORTS
- ; Explicit exports can go here
- PSEgetLibType @2
- PSEgetLibName @3
- PSEgetLibVersion @4
- GPUinit @5
- GPUshutdown @6
- GPUopen @7
- GPUclose @8
- GPUconfigure @9
- GPUabout @10
- GPUtest @11
- GPUwriteData @12
- GPUwriteStatus @13
- GPUreadData @14
- GPUreadStatus @15
- GPUdmaChain @16
- GPUupdateLace @17
- GPUmakeSnapshot @18
- GPUwriteDataMem @19
- GPUreadDataMem @20
- GPUdisplayFlags @21
- GPUfreeze @22
- GPUgetScreenPic @23
- GPUshowScreenPic @24
-
- GPUcursor @25
-
- GPUsetfix @26
- GPUsetframelimit @27
- GPUvisualVibration @28
- GPUaddVertex @29
+; gpuPeopsOpenGL.def : Declares the module parameters for the DLL.
+
+LIBRARY "gpuPeopsOpenGL"
+DESCRIPTION 'gpuPeopsOpenGL OpenGL Windows Dynamic Link Library'
+EXPORTS
+ ; Explicit exports can go here
+ PSEgetLibType @2
+ PSEgetLibName @3
+ PSEgetLibVersion @4
+ GPUinit @5
+ GPUshutdown @6
+ GPUopen @7
+ GPUclose @8
+ GPUconfigure @9
+ GPUabout @10
+ GPUtest @11
+ GPUwriteData @12
+ GPUwriteStatus @13
+ GPUreadData @14
+ GPUreadStatus @15
+ GPUdmaChain @16
+ GPUupdateLace @17
+ GPUmakeSnapshot @18
+ GPUwriteDataMem @19
+ GPUreadDataMem @20
+ GPUdisplayFlags @21
+ GPUfreeze @22
+ GPUgetScreenPic @23
+ GPUshowScreenPic @24
+
+ GPUcursor @25
+
+ GPUsetfix @26
+ GPUsetframelimit @27
+ GPUvisualVibration @28
+ GPUaddVertex @29
diff --git a/win32/plugins/peopsxgl/gpuPeopsOpenGL.dev b/win32/plugins/peopsxgl/gpuPeopsOpenGL.dev
index 364e1ef8..7a54f74f 100644..100755
--- a/win32/plugins/peopsxgl/gpuPeopsOpenGL.dev
+++ b/win32/plugins/peopsxgl/gpuPeopsOpenGL.dev
@@ -1,319 +1,319 @@
-[Project]
-FileName=gpuPeopsOpenGL.dev
-Name=gpuPeopsOpenGL
-Ver=1
-IsCpp=1
-Type=3
-Compiler=-W -DWIN32 -DNDEBUG -D_WINDOWS_@@_
-CppCompiler=-W -DWIN32 -DNDEBUG -D_WINDOWS_@@_
-Includes=.\\;.\winsrc;..\..\glue;..\..\..\plugins\peopsxgl;..\..\..\libpcsxcore
-Linker=-luser32 -lgdi32 -lopengl32 -lwinmm -ladvapi32 -def gpuPeopsOpenGL.def --enable-stdcall-fixup_@@_
-Libs=
-UnitCount=27
-Folders=peopsxgl,winsrc
-ObjFiles=
-PrivateResource=gpuPeopsOpenGL_private.rc
-ResourceIncludes=
-MakeIncludes=
-Icon=
-ExeOutput=
-ObjectOutput=
-OverrideOutput=0
-OverrideOutputName=gpuPeopsOpenGL.exe
-HostApplication=
-CommandLine=
-UseCustomMakefile=0
-CustomMakefile=
-IncludeVersionInfo=0
-SupportXPThemes=0
-CompilerSet=0
-CompilerSettings=0010000001001000000000
-
-[Unit1]
-FileName=winsrc\cfg.c
-Folder=winsrc
-Compile=1
-CompileCpp=0
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit2]
-FileName=winsrc\fps.c
-Folder=winsrc
-Compile=1
-CompileCpp=0
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit3]
-FileName=winsrc\key.c
-Folder=winsrc
-Compile=1
-CompileCpp=0
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit4]
-FileName=winsrc\ssave.c
-Folder=winsrc
-Compile=1
-CompileCpp=0
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit5]
-FileName=winsrc\ssave.h
-Folder=winsrc
-Compile=1
-CompileCpp=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit6]
-FileName=winsrc\winmain.c
-Folder=winsrc
-Compile=1
-CompileCpp=0
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit7]
-FileName=..\..\..\plugins\peopsxgl\cfg.h
-Folder=peopsxgl
-Compile=1
-CompileCpp=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit8]
-FileName=..\..\..\plugins\peopsxgl\draw.c
-Folder=peopsxgl
-Compile=1
-CompileCpp=0
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit9]
-FileName=..\..\..\plugins\peopsxgl\draw.h
-Folder=peopsxgl
-Compile=1
-CompileCpp=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit10]
-FileName=..\..\..\plugins\peopsxgl\externals.h
-Folder=peopsxgl
-Compile=1
-CompileCpp=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit11]
-FileName=..\..\..\plugins\peopsxgl\fps.h
-Folder=peopsxgl
-Compile=1
-CompileCpp=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit12]
-FileName=..\..\..\plugins\peopsxgl\gl_ext.h
-Folder=peopsxgl
-Compile=1
-CompileCpp=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit13]
-FileName=..\..\..\plugins\peopsxgl\gpu.c
-Folder=peopsxgl
-Compile=1
-CompileCpp=0
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit14]
-FileName=..\..\..\plugins\peopsxgl\gpu.h
-Folder=peopsxgl
-Compile=1
-CompileCpp=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit15]
-FileName=..\..\..\plugins\peopsxgl\key.h
-Folder=peopsxgl
-Compile=1
-CompileCpp=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit16]
-FileName=..\..\..\plugins\peopsxgl\menu.c
-Folder=peopsxgl
-Compile=1
-CompileCpp=0
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit17]
-FileName=..\..\..\plugins\peopsxgl\menu.h
-Folder=peopsxgl
-Compile=1
-CompileCpp=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit18]
-FileName=..\..\..\plugins\peopsxgl\prim.c
-Folder=peopsxgl
-Compile=1
-CompileCpp=0
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit19]
-FileName=..\..\..\plugins\peopsxgl\prim.h
-Folder=peopsxgl
-Compile=1
-CompileCpp=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit20]
-FileName=..\..\..\plugins\peopsxgl\soft.c
-Folder=peopsxgl
-Compile=1
-CompileCpp=0
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit21]
-FileName=..\..\..\plugins\peopsxgl\soft.h
-Folder=peopsxgl
-Compile=1
-CompileCpp=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit22]
-FileName=..\..\..\plugins\peopsxgl\stdafx.h
-Folder=peopsxgl
-Compile=1
-CompileCpp=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit23]
-FileName=..\..\..\plugins\peopsxgl\texture.c
-Folder=peopsxgl
-Compile=1
-CompileCpp=0
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit24]
-FileName=..\..\..\plugins\peopsxgl\texture.h
-Folder=peopsxgl
-Compile=1
-CompileCpp=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit25]
-FileName=gpuPeopsOpenGL.def
-Folder=
-Compile=0
-CompileCpp=0
-Link=0
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit26]
-FileName=gpuPeopsOpenGL.rc
-Folder=Resources
-Compile=1
-CompileCpp=1
-Link=0
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit27]
-FileName=resource.h
-Folder=
-Compile=1
-CompileCpp=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[VersionInfo]
-Major=0
-Minor=1
-Release=1
-Build=1
-LanguageID=1033
-CharsetID=1252
-CompanyName=
-FileVersion=0.1
-FileDescription=Developed using the Dev-C++ IDE
-InternalName=
-LegalCopyright=
-LegalTrademarks=
-OriginalFilename=gpuPeopsOpenGL.exe
-ProductName=gpuPeopsOpenGL
-ProductVersion=0.1
-AutoIncBuildNr=0
-
+[Project]
+FileName=gpuPeopsOpenGL.dev
+Name=gpuPeopsOpenGL
+Ver=1
+IsCpp=1
+Type=3
+Compiler=-W -DWIN32 -DNDEBUG -D_WINDOWS_@@_
+CppCompiler=-W -DWIN32 -DNDEBUG -D_WINDOWS_@@_
+Includes=.\\;.\winsrc;..\..\glue;..\..\..\plugins\peopsxgl;..\..\..\libpcsxcore
+Linker=-luser32 -lgdi32 -lopengl32 -lwinmm -ladvapi32 -def gpuPeopsOpenGL.def --enable-stdcall-fixup_@@_
+Libs=
+UnitCount=27
+Folders=peopsxgl,winsrc
+ObjFiles=
+PrivateResource=gpuPeopsOpenGL_private.rc
+ResourceIncludes=
+MakeIncludes=
+Icon=
+ExeOutput=
+ObjectOutput=
+OverrideOutput=0
+OverrideOutputName=gpuPeopsOpenGL.exe
+HostApplication=
+CommandLine=
+UseCustomMakefile=0
+CustomMakefile=
+IncludeVersionInfo=0
+SupportXPThemes=0
+CompilerSet=0
+CompilerSettings=0010000001001000000000
+
+[Unit1]
+FileName=winsrc\cfg.c
+Folder=winsrc
+Compile=1
+CompileCpp=0
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit2]
+FileName=winsrc\fps.c
+Folder=winsrc
+Compile=1
+CompileCpp=0
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit3]
+FileName=winsrc\key.c
+Folder=winsrc
+Compile=1
+CompileCpp=0
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit4]
+FileName=winsrc\ssave.c
+Folder=winsrc
+Compile=1
+CompileCpp=0
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit5]
+FileName=winsrc\ssave.h
+Folder=winsrc
+Compile=1
+CompileCpp=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit6]
+FileName=winsrc\winmain.c
+Folder=winsrc
+Compile=1
+CompileCpp=0
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit7]
+FileName=..\..\..\plugins\peopsxgl\cfg.h
+Folder=peopsxgl
+Compile=1
+CompileCpp=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit8]
+FileName=..\..\..\plugins\peopsxgl\draw.c
+Folder=peopsxgl
+Compile=1
+CompileCpp=0
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit9]
+FileName=..\..\..\plugins\peopsxgl\draw.h
+Folder=peopsxgl
+Compile=1
+CompileCpp=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit10]
+FileName=..\..\..\plugins\peopsxgl\externals.h
+Folder=peopsxgl
+Compile=1
+CompileCpp=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit11]
+FileName=..\..\..\plugins\peopsxgl\fps.h
+Folder=peopsxgl
+Compile=1
+CompileCpp=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit12]
+FileName=..\..\..\plugins\peopsxgl\gl_ext.h
+Folder=peopsxgl
+Compile=1
+CompileCpp=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit13]
+FileName=..\..\..\plugins\peopsxgl\gpu.c
+Folder=peopsxgl
+Compile=1
+CompileCpp=0
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit14]
+FileName=..\..\..\plugins\peopsxgl\gpu.h
+Folder=peopsxgl
+Compile=1
+CompileCpp=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit15]
+FileName=..\..\..\plugins\peopsxgl\key.h
+Folder=peopsxgl
+Compile=1
+CompileCpp=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit16]
+FileName=..\..\..\plugins\peopsxgl\menu.c
+Folder=peopsxgl
+Compile=1
+CompileCpp=0
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit17]
+FileName=..\..\..\plugins\peopsxgl\menu.h
+Folder=peopsxgl
+Compile=1
+CompileCpp=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit18]
+FileName=..\..\..\plugins\peopsxgl\prim.c
+Folder=peopsxgl
+Compile=1
+CompileCpp=0
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit19]
+FileName=..\..\..\plugins\peopsxgl\prim.h
+Folder=peopsxgl
+Compile=1
+CompileCpp=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit20]
+FileName=..\..\..\plugins\peopsxgl\soft.c
+Folder=peopsxgl
+Compile=1
+CompileCpp=0
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit21]
+FileName=..\..\..\plugins\peopsxgl\soft.h
+Folder=peopsxgl
+Compile=1
+CompileCpp=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit22]
+FileName=..\..\..\plugins\peopsxgl\stdafx.h
+Folder=peopsxgl
+Compile=1
+CompileCpp=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit23]
+FileName=..\..\..\plugins\peopsxgl\texture.c
+Folder=peopsxgl
+Compile=1
+CompileCpp=0
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit24]
+FileName=..\..\..\plugins\peopsxgl\texture.h
+Folder=peopsxgl
+Compile=1
+CompileCpp=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit25]
+FileName=gpuPeopsOpenGL.def
+Folder=
+Compile=0
+CompileCpp=0
+Link=0
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit26]
+FileName=gpuPeopsOpenGL.rc
+Folder=Resources
+Compile=1
+CompileCpp=1
+Link=0
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit27]
+FileName=resource.h
+Folder=
+Compile=1
+CompileCpp=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[VersionInfo]
+Major=0
+Minor=1
+Release=1
+Build=1
+LanguageID=1033
+CharsetID=1252
+CompanyName=
+FileVersion=0.1
+FileDescription=Developed using the Dev-C++ IDE
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=gpuPeopsOpenGL.exe
+ProductName=gpuPeopsOpenGL
+ProductVersion=0.1
+AutoIncBuildNr=0
+
diff --git a/win32/plugins/peopsxgl/gpuPeopsOpenGL.dsp b/win32/plugins/peopsxgl/gpuPeopsOpenGL.dsp
index 4862dad7..728b3b77 100644..100755
--- a/win32/plugins/peopsxgl/gpuPeopsOpenGL.dsp
+++ b/win32/plugins/peopsxgl/gpuPeopsOpenGL.dsp
@@ -1,211 +1,211 @@
-# Microsoft Developer Studio Project File - Name="gpuPeopsOpenGL" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=gpuPeopsOpenGL - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "gpuPeopsOpenGL.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "gpuPeopsOpenGL.mak" CFG="gpuPeopsOpenGL - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "gpuPeopsOpenGL - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "gpuPeopsOpenGL - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "gpuPeopsOpenGL - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /G5 /MD /W3 /GX /O2 /I ".\\" /I ".\winsrc" /I "..\..\glue" /I "..\..\..\plugins\peopsxgl" /I "..\..\..\libpcsxcore" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FR /YX /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x407 /d "NDEBUG"
-# ADD RSC /l 0x407 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
-# ADD LINK32 user32.lib gdi32.lib opengl32.lib winmm.lib advapi32.lib /nologo /subsystem:windows /dll /machine:I386
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Cmds=rem copy release\*.dll d:\emus\epsxe\plugins
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "gpuPeopsOpenGL - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I ".\\" /I ".\winsrc" /I "..\..\glue" /I "..\..\..\plugins\peopsxgl" /I "..\..\..\libpcsxcore" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /GZ /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x407 /d "_DEBUG"
-# ADD RSC /l 0x407 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib winmm.lib /nologo /subsystem:windows /dll /incremental:no /debug /machine:I386 /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "gpuPeopsOpenGL - Win32 Release"
-# Name "gpuPeopsOpenGL - Win32 Debug"
-# Begin Group "winsrc"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\winsrc\cfg.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\winsrc\fps.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\winsrc\key.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\winsrc\ssave.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\winsrc\ssave.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\winsrc\winmain.c
-# End Source File
-# End Group
-# Begin Group "peopsxgl"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=..\..\..\plugins\peopsxgl\cfg.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\plugins\peopsxgl\draw.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\plugins\peopsxgl\draw.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\plugins\peopsxgl\externals.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\plugins\peopsxgl\fps.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\plugins\peopsxgl\gl_ext.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\plugins\peopsxgl\gpu.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\plugins\peopsxgl\gpu.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\plugins\peopsxgl\key.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\plugins\peopsxgl\menu.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\plugins\peopsxgl\menu.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\plugins\peopsxgl\prim.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\plugins\peopsxgl\prim.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\plugins\peopsxgl\soft.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\plugins\peopsxgl\soft.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\plugins\peopsxgl\stdafx.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\plugins\peopsxgl\texture.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\plugins\peopsxgl\texture.h
-# End Source File
-# End Group
-# Begin Source File
-
-SOURCE=.\gpuPeopsOpenGL.def
-# End Source File
-# Begin Source File
-
-SOURCE=.\gpuPeopsOpenGL.rc
-# End Source File
-# Begin Source File
-
-SOURCE=.\resource.h
-# End Source File
-# End Target
-# End Project
+# Microsoft Developer Studio Project File - Name="gpuPeopsOpenGL" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=gpuPeopsOpenGL - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "gpuPeopsOpenGL.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "gpuPeopsOpenGL.mak" CFG="gpuPeopsOpenGL - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "gpuPeopsOpenGL - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "gpuPeopsOpenGL - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "gpuPeopsOpenGL - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /G5 /MD /W3 /GX /O2 /I ".\\" /I ".\winsrc" /I "..\..\glue" /I "..\..\..\plugins\peopsxgl" /I "..\..\..\libpcsxcore" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FR /YX /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x407 /d "NDEBUG"
+# ADD RSC /l 0x407 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
+# ADD LINK32 user32.lib gdi32.lib opengl32.lib winmm.lib advapi32.lib /nologo /subsystem:windows /dll /machine:I386
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Cmds=rem copy release\*.dll d:\emus\epsxe\plugins
+# End Special Build Tool
+
+!ELSEIF "$(CFG)" == "gpuPeopsOpenGL - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I ".\\" /I ".\winsrc" /I "..\..\glue" /I "..\..\..\plugins\peopsxgl" /I "..\..\..\libpcsxcore" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x407 /d "_DEBUG"
+# ADD RSC /l 0x407 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib winmm.lib /nologo /subsystem:windows /dll /incremental:no /debug /machine:I386 /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "gpuPeopsOpenGL - Win32 Release"
+# Name "gpuPeopsOpenGL - Win32 Debug"
+# Begin Group "winsrc"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\winsrc\cfg.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\winsrc\fps.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\winsrc\key.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\winsrc\ssave.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\winsrc\ssave.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\winsrc\winmain.c
+# End Source File
+# End Group
+# Begin Group "peopsxgl"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\..\plugins\peopsxgl\cfg.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\peopsxgl\draw.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\peopsxgl\draw.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\peopsxgl\externals.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\peopsxgl\fps.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\peopsxgl\gl_ext.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\peopsxgl\gpu.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\peopsxgl\gpu.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\peopsxgl\key.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\peopsxgl\menu.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\peopsxgl\menu.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\peopsxgl\prim.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\peopsxgl\prim.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\peopsxgl\soft.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\peopsxgl\soft.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\peopsxgl\stdafx.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\peopsxgl\texture.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\peopsxgl\texture.h
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=.\gpuPeopsOpenGL.def
+# End Source File
+# Begin Source File
+
+SOURCE=.\gpuPeopsOpenGL.rc
+# End Source File
+# Begin Source File
+
+SOURCE=.\resource.h
+# End Source File
+# End Target
+# End Project
diff --git a/win32/plugins/peopsxgl/gpuPeopsOpenGL.rc b/win32/plugins/peopsxgl/gpuPeopsOpenGL.rc
index cd659600..1f6d8b59 100644..100755
--- a/win32/plugins/peopsxgl/gpuPeopsOpenGL.rc
+++ b/win32/plugins/peopsxgl/gpuPeopsOpenGL.rc
@@ -1,511 +1,511 @@
-//Microsoft Developer Studio generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "afxres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// Neutral resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
-#ifdef _WIN32
-LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
-#pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Bitmap
-//
-
-IDB_GPU BITMAP DISCARDABLE "res\\gpu.bmp"
-#endif // Neutral resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE DISCARDABLE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE DISCARDABLE
-BEGIN
- "#include ""afxres.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE DISCARDABLE
-BEGIN
- "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
- "#define _AFX_NO_OLE_RESOURCES\r\n"
- "#define _AFX_NO_TRACKER_RESOURCES\r\n"
- "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
- "\r\n"
- "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
- "#ifdef _WIN32\r\n"
- "LANGUAGE 9, 1\r\n"
- "#pragma code_page(1252)\r\n"
- "#endif\r\n"
- "#endif\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-
-#ifndef _MAC
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,78,0,0
- PRODUCTVERSION 1,78,0,0
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x4L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "040904b0"
- BEGIN
- VALUE "Comments", "\0"
- VALUE "CompanyName", "\0"
- VALUE "FileDescription", "gpuPeopsOpenGL. DLL\0"
- VALUE "FileVersion", "1, 78, 0, 0\0"
- VALUE "InternalName", "P.E.Op.S. PSX OpenGL GPU (mod)\0"
- VALUE "LegalCopyright", "Copyright (C) 1999-2009\0"
- VALUE "LegalTrademarks", "\0"
- VALUE "OriginalFilename", "gpuPeopsOpenGL.DLL\0"
- VALUE "PrivateBuild", "\0"
- VALUE "ProductName", "gpuPeopsOpenGL Dynamic Link Library\0"
- VALUE "ProductVersion", "1, 78, 0, 0\0"
- VALUE "SpecialBuild", "\0"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x409, 1200
- END
-END
-
-#endif // !_MAC
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_DIALOG_ABOUT DIALOG DISCARDABLE 0, 0, 258, 165
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "About P.E.Op.S. PSX OpenGL Renderer ..."
-FONT 8, "MS Sans Serif"
-BEGIN
- DEFPUSHBUTTON "OK",IDOK,98,145,50,14
- RTEXT "Version:",IDC_STATIC,8,6,49,10
- RTEXT "Coded by:",IDC_STATIC,8,35,49,10
- RTEXT "Homepage:",IDC_STATIC,8,53,49,10
- LTEXT "1.78",IDC_STATIC,60,6,159,9
- LTEXT "Pete Bernert",IDC_STATIC,60,35,159,10
- LTEXT "www.pbernert.com",IDC_STATIC,60,53,159,10
- RTEXT "Release date:",IDC_STATIC,8,17,49,10
- LTEXT "04/2009",IDC_STATIC,60,17,159,10
- RTEXT "Thanks to:",IDC_STATIC,8,74,49,10
- LTEXT "Lewpy - without his infos this driver wouldn't exist",
- IDC_STATIC,60,74,159,10
- LTEXT "Duddie && FoxPro - for their public sources",IDC_STATIC,
- 60,86,159,10
- LTEXT "My girlfriend Heike - 'Hey, that cloud still looks funny, ",
- IDC_STATIC,60,112,170,10
- LTEXT "go on and change it...'",IDC_STATIC,125,121,117,10
- CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME | SS_SUNKEN,4,68,
- 249,70
- LTEXT "Gamma - thanks for your OpenGL book",IDC_STATIC,60,99,
- 159,10
-END
-
-IDD_CFGDLG DIALOGEX 0, 0, 413, 306
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Configure P.E.Op.S. PSX OpenGL Renderer ..."
-FONT 8, "MS Sans Serif"
-BEGIN
- CONTROL "Fullscreen mode",IDC_DISPMODE1,"Button",BS_AUTORADIOBUTTON,11,11,73,10
- CONTROL "Window mode",IDC_DISPMODE2,"Button",BS_AUTORADIOBUTTON,11,25,63,10
- COMBOBOX IDC_RESOLUTION,150,10,63,64,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
- COMBOBOX IDC_COLORDEPTH,261,10,36,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- EDITTEXT IDC_WINX,150,24,26,12,ES_AUTOHSCROLL
- EDITTEXT IDC_WINY,187,24,26,12,ES_AUTOHSCROLL
- CONTROL "Keep psx aspect ratio",IDC_ARATIO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,306,17,95,12
- COMBOBOX IDC_TEXQUALITY,61,50,159,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- COMBOBOX IDC_FILTERTYPE,61,63,159,83,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- COMBOBOX IDC_HIRESTEX,275,50,129,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- COMBOBOX IDC_VRAMSIZE,275,63,62,88,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
- CONTROL "Show FPS display on startup",IDC_SHOWFPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,94,107,10
- PUSHBUTTON "...",IDC_KEYCONFIG,119,94,11,10,0,WS_EX_STATICEDGE
- CONTROL "Use FPS limit",IDC_USELIMIT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,149,89,73,10
- CONTROL "Use Frame skipping",IDC_USESKIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,149,101,78,10
- CONTROL "Auto-detect FPS/Frame skipping limit",IDC_FRAMEAUTO,
- "Button",BS_AUTORADIOBUTTON | WS_GROUP,258,89,131,9
- CONTROL "FPS limit (10-200) :",IDC_FRAMEMANUELL,"Button",BS_AUTORADIOBUTTON,258,100,72,10
- EDITTEXT IDC_FRAMELIMIT,334,99,29,12,ES_AUTOHSCROLL
- COMBOBOX IDC_OFFSCREEN,78,123,130,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- COMBOBOX IDC_FRAMETEX,78,136,130,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- COMBOBOX IDC_FRAMEREAD,78,149,130,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- CONTROL "Alpha MultiPass",IDC_OPAQUE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,219,127,66,10
- CONTROL "Mask bit",IDC_USEMASK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,219,138,47,10
- CONTROL "Advanced blending",IDC_ADVBLEND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,219,149,76,10
- CONTROL "Scanlines",IDC_USESCANLINES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,176,46,10
- EDITTEXT IDC_SCANBLEND,375,175,29,12,ES_AUTOHSCROLL
- CONTROL "Line mode",IDC_USELINES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,186,48,10
- CONTROL "Unfiltered framebuffer updates",IDC_FASTMDEC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,196,113,10
- CONTROL "Force 15 bit framebuffer updates",IDC_FASTMDEC2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,206,121,10
- CONTROL "Color dithering",IDC_DRAWDITHER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,216,81,10
- CONTROL "Screen smoothing",IDC_BLUR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,226,81,10
- CONTROL "Disable screensaver",IDC_SSAVE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,236,81,10
- CONTROL "Special game fixes",IDC_GAMEFIX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,246,75,10
- PUSHBUTTON "...",IDC_SELFIX,89,246,11,10,0,WS_EX_STATICEDGE
- PUSHBUTTON "Fast",IDC_DEF1,10,282,34,14
- PUSHBUTTON "Nice",IDC_DEF2,49,282,34,14
- DEFPUSHBUTTON "OK",IDOK,113,282,84,14
- PUSHBUTTON "Cancel",IDCANCEL,215,282,84,14
- PUSHBUTTON "Copy settings\n to clipboard",IDC_CLIPBOARD,322,276,87,25,BS_MULTILINE,WS_EX_STATICEDGE
- GROUPBOX "Misc",IDC_STATIC,3,166,406,104
- GROUPBOX "Default settings",IDC_STATIC,3,272,88,30
- GROUPBOX "Textures",IDC_STATIC,3,41,406,40
- RTEXT "Desktop resolution:",IDC_STATIC,81,12,65,9
- GROUPBOX "Resolution && Colors",IDC_STATIC,3,1,406,40
- RTEXT "Color depth:",IDC_STATIC,219,12,39,9
- GROUPBOX "Framerate",IDC_STATIC,3,81,406,33
- LTEXT "FPS",IDC_STATIC,367,100,17,9,SS_CENTERIMAGE
- GROUPBOX "Compatibility",IDC_STATIC,3,115,406,51
- RTEXT "Texture quality:",IDC_QUALTXT,6,52,51,9
- RTEXT "Window size:",IDC_STATIC,85,26,61,9
- CTEXT "x",IDC_STATIC,177,26,8,9
- RTEXT "Gfx card vram:",IDC_QUALTXT2,225,65,48,9
- RTEXT "Off-Screen drawing:",IDC_STATIC,11,124,64,10,SS_CENTERIMAGE
- RTEXT "Texture filtering:",IDC_STATIC,6,65,52,10
- RTEXT "Framebuffer textures:",IDC_STATIC,7,137,68,10,SS_CENTERIMAGE
- LTEXT "Some games will need certain special options to work without glitches",IDC_STATIC,135,246,242,9,SS_CENTERIMAGE
- LTEXT "Smoother shading in 16 bit color depth",IDC_STATIC,135,216,242,9,SS_CENTERIMAGE
- LTEXT "Small speed up with mdecs",IDC_STATIC,135,196,242,9,SS_CENTERIMAGE
- LTEXT "Polygons will not get filled",IDC_STATIC,135,186,89,9,SS_CENTERIMAGE
- LTEXT "TV screen alike lines",IDC_STATIC,135,176,69,9,SS_CENTERIMAGE
- LTEXT "Accurate psx color emulation",IDC_STATIC,303,149,97,9,SS_CENTERIMAGE
- LTEXT "Correct opaque texture areas",IDC_STATIC,302,127,97,9,SS_CENTERIMAGE
- LTEXT "Needed by a few games",IDC_STATIC,302,138,97,9,SS_CENTERIMAGE
- RTEXT "Scanline brightness (0...255, -1=Monitor dot matrix):",IDC_STATIC,210,176,162,9,SS_CENTERIMAGE
- EDITTEXT IDC_CLPEDIT,314,293,6,12,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | NOT WS_VISIBLE
- LTEXT "MBytes",IDC_QUALTXT3,340,65,27,9
- LTEXT "The complete screen will get smoothed. Very slow on some cards, lotta vram needed",IDC_STATIC,135,226,269,9,SS_CENTERIMAGE
- RTEXT "Framebuffer access:",IDC_STATIC,7,150,68,10,SS_CENTERIMAGE
- LTEXT "Disable screensavers and power saving modes. Not available in Win95/WinNT",IDC_STATIC,135,236,269,9,SS_CENTERIMAGE
- LTEXT "Speed up with mdecs in 32 bit color depth, but less colorful",IDC_T14_STATIC2,135,206,268,9,SS_CENTERIMAGE
- RTEXT "Hi-Res textures:",IDC_QUALTXT4,223,52,50,9
- COMBOBOX IDC_VSYNC,261,24,36,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- RTEXT "V-Sync:",IDC_STATIC,219,26,39,9,SS_CENTERIMAGE
- CONTROL "Gte accuracy",IDC_GTEACCURACY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,256,59,10
-END
-
-IDD_FIXES DIALOG DISCARDABLE 0, 0, 316, 322
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Special game fixes..."
-FONT 8, "MS Sans Serif"
-BEGIN
- CONTROL "0x00001: Adjust framebuffer access",IDC_FIX1,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,11,30,133,10
- CONTROL "0x00004: Ignore black brightness",IDC_FIX3,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,11,60,140,10
- CONTROL "0x00008: Swap front/back detection",IDC_FIX4,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,11,75,144,10
- CONTROL "0x00010: Disable coord check",IDC_FIX5,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,11,90,139,10
- CONTROL "0x00020: Remove blue glitches",IDC_FIX6,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,11,105,139,10
- CONTROL "0x00040: Mixed software FB access",IDC_FIX7,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,11,120,143,10
- CONTROL "0x00080: Use PC fps calculation",IDC_FIX8,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,11,135,142,10
- CONTROL "0x00100: Use old frame skipping",IDC_FIX9,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,11,150,139,10
- CONTROL "0x00002: Direct framebuffer updates",IDC_FIX2,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,11,45,137,10
- CONTROL "0x00200: G4 polygon cache",IDC_FIX10,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,11,165,141,10
- CONTROL "0x00400: Fake subtractive blending",IDC_FIX11,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,11,180,143,10
- CONTROL "0x00800: Lazy upload detection",IDC_FIX12,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,11,195,144,10
- CONTROL "0x01000: Odd/even bit hack",IDC_FIX13,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,11,210,143,10
- CONTROL "0x02000: Expand screen width",IDC_FIX14,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,11,225,144,10
- DEFPUSHBUTTON "OK",IDOK,83,302,50,14
- PUSHBUTTON "Cancel",IDCANCEL,182,302,50,14
- LTEXT "Activate the following options only if you want to play one of the listed games (or if your game is showing similar glitches)!",
- IDC_STATIC,7,4,246,22
- LTEXT "ONLY for FF7 battle cursor/battle swirl",IDC_STATIC,163,
- 30,137,9,SS_CENTERIMAGE
- LTEXT "Speed up in nasty frame upload situations",IDC_STATIC,
- 163,45,137,9,SS_CENTERIMAGE
- LTEXT "Fixes black screens in Lunar",IDC_STATIC,162,60,123,9,
- SS_CENTERIMAGE
- LTEXT "Speed freaks, Killer Loop",IDC_STATIC,162,75,90,9,
- SS_CENTERIMAGE
- LTEXT "Old coord compatibility mode",IDC_STATIC,162,89,99,9,
- SS_CENTERIMAGE
- LTEXT "Leg. o. Dragoon, Alpha Multipass needed",IDC_STATIC,162,
- 105,136,9,SS_CENTERIMAGE
- LTEXT "Faster FB access on some systems/ATI",IDC_STATIC,162,
- 120,125,9,SS_CENTERIMAGE
- LTEXT "Better fps limitation with some games",IDC_STATIC,162,
- 135,117,9,SS_CENTERIMAGE
- LTEXT "Skips only every second frame",IDC_STATIC,162,150,130,9,
- SS_CENTERIMAGE
- LTEXT "ONLY for FF9 battle mode... yellow rect",IDC_STATIC,162,
- 165,132,9,SS_CENTERIMAGE
- LTEXT "Needed by some (buggy) OpenGL ICDs",IDC_STATIC,162,180,
- 132,9,SS_CENTERIMAGE
- LTEXT "DW7 fix (not 100% perfect...)",IDC_STATIC,162,195,132,9,
- SS_CENTERIMAGE
- LTEXT "Needed with epsxe 1.5.2 and older",IDC_STATIC,162,210,
- 138,9,SS_CENTERIMAGE
- LTEXT "Shows the full area in Capcom 2D fighters",IDC_STATIC,
- 162,225,138,9,SS_CENTERIMAGE
- CONTROL "0x04000: Use old texture filtering",IDC_FIX15,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,11,240,141,10
- LTEXT "Fixes black areas with some cards",IDC_STATIC,162,240,
- 138,9,SS_CENTERIMAGE
- CONTROL "0x08000: Special upload detection",IDC_FIX16,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,11,255,146,10
- LTEXT "May show some additional splash screens",
- IDC_F14_STATIC3,163,255,137,9,SS_CENTERIMAGE
- CONTROL "0x10000: Use low-res fps timer",IDC_FIX17,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,11,270,147,10
- LTEXT "For buggy motherboard chipsets",IDC_F14_STATIC4,163,270,
- 137,9,SS_CENTERIMAGE
- CONTROL "0x20000: Fake 'gpu busy' states",IDC_FIX18,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,11,285,147,10
- LTEXT "Toggles busy flags after drawing",IDC_F14_STATIC5,163,
- 285,137,9,SS_CENTERIMAGE
-END
-
-IDD_KEYS DIALOG DISCARDABLE 0, 0, 186, 162
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
-CAPTION "GPU key configuration"
-FONT 8, "MS Sans Serif"
-BEGIN
- PUSHBUTTON "Default keys",IDC_DEFAULT,107,6,61,13
- COMBOBOX IDC_KEY1,108,25,61,62,CBS_DROPDOWNLIST | WS_VSCROLL |
- WS_TABSTOP
- COMBOBOX IDC_KEY2,108,41,61,62,CBS_DROPDOWNLIST | WS_VSCROLL |
- WS_TABSTOP
- COMBOBOX IDC_KEY3,108,57,61,62,CBS_DROPDOWNLIST | WS_VSCROLL |
- WS_TABSTOP
- COMBOBOX IDC_KEY4,108,73,61,62,CBS_DROPDOWNLIST | WS_VSCROLL |
- WS_TABSTOP
- COMBOBOX IDC_KEY5,108,89,61,62,CBS_DROPDOWNLIST | WS_VSCROLL |
- WS_TABSTOP
- COMBOBOX IDC_KEY6,108,105,61,62,CBS_DROPDOWNLIST | WS_VSCROLL |
- WS_TABSTOP
- DEFPUSHBUTTON "OK",IDOK,19,142,50,14
- PUSHBUTTON "Cancel",IDCANCEL,115,142,50,14
- RTEXT "Show/hide gpu menu:",IDC_STATIC,4,26,100,9,
- SS_CENTERIMAGE
- RTEXT "Show/hide gpu infos:",IDC_STATIC,4,42,100,9,
- SS_CENTERIMAGE
- RTEXT "Toggle selected option up:",IDC_STATIC,4,58,100,9,
- SS_CENTERIMAGE
- RTEXT "Toggle selected option down:",IDC_STATIC,4,74,100,9,
- SS_CENTERIMAGE
- RTEXT "Select previous option:",IDC_STATIC,4,90,100,9,
- SS_CENTERIMAGE
- RTEXT "Select next option:",IDC_STATIC,4,106,100,9,
- SS_CENTERIMAGE
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO DISCARDABLE
-BEGIN
- IDD_DIALOG_ABOUT, DIALOG
- BEGIN
- LEFTMARGIN, 2
- RIGHTMARGIN, 253
- TOPMARGIN, 3
- BOTTOMMARGIN, 159
- END
-
- IDD_CFGDLG, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 406
- TOPMARGIN, 7
- BOTTOMMARGIN, 288
- END
-
- IDD_FIXES, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 309
- TOPMARGIN, 7
- BOTTOMMARGIN, 315
- END
-
- IDD_KEYS, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 179
- TOPMARGIN, 7
- BOTTOMMARGIN, 155
- END
-END
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog Info
-//
-#ifdef _MSC_VER
-
-IDD_CFGDLG DLGINIT
-BEGIN
- IDC_RESOLUTION, 0x403, 1, 0
-"\000"
- IDC_COLORDEPTH, 0x403, 7, 0
-0x3631, 0x4220, 0x7469, "\000"
- IDC_COLORDEPTH, 0x403, 7, 0
-0x3233, 0x4220, 0x7469, "\000"
- IDC_TEXQUALITY, 0x403, 11, 0
-0x6f64, 0x276e, 0x2074, 0x6163, 0x6572, "\000"
- IDC_TEXQUALITY, 0x403, 12, 0
-0x3452, 0x4720, 0x2034, 0x3442, 0x4120, 0x0034,
- IDC_TEXQUALITY, 0x403, 12, 0
-0x3552, 0x4720, 0x2035, 0x3542, 0x4120, 0x0031,
- IDC_TEXQUALITY, 0x403, 12, 0
-0x3852, 0x4720, 0x2038, 0x3842, 0x4120, 0x0038,
- IDC_FILTERTYPE, 0x403, 9, 0
-0x7453, 0x6e61, 0x6164, 0x6472, "\000"
- IDC_FILTERTYPE, 0x403, 9, 0
-0x7845, 0x6574, 0x646e, 0x6465, "\000"
- IDC_FILTERTYPE, 0x403, 22, 0
-0x7453, 0x6e61, 0x6164, 0x6472, 0x2820, 0x6f6e, 0x5320, 0x7270, 0x7469,
-0x7365, 0x0029,
- IDC_FILTERTYPE, 0x403, 22, 0
-0x7845, 0x6574, 0x646e, 0x6465, 0x2820, 0x6f6e, 0x5320, 0x7270, 0x7469,
-0x7365, 0x0029,
- IDC_HIRESTEX, 0x403, 11, 0
-0x6f64, 0x276e, 0x2074, 0x6163, 0x6572, "\000"
- IDC_HIRESTEX, 0x403, 12, 0
-0x3452, 0x4720, 0x2034, 0x3442, 0x4120, 0x0034,
- IDC_HIRESTEX, 0x403, 12, 0
-0x3552, 0x4720, 0x2035, 0x3542, 0x4120, 0x0031,
- IDC_HIRESTEX, 0x403, 12, 0
-0x3852, 0x4720, 0x2038, 0x3842, 0x4120, 0x0038,
- IDC_OFFSCREEN, 0x403, 11, 0
-0x6f64, 0x276e, 0x2074, 0x6163, 0x6572, "\000"
- IDC_OFFSCREEN, 0x403, 12, 0
-0x3452, 0x4720, 0x2034, 0x3442, 0x4120, 0x0034,
- IDC_OFFSCREEN, 0x403, 12, 0
-0x3552, 0x4720, 0x2035, 0x3542, 0x4120, 0x0031,
- IDC_OFFSCREEN, 0x403, 12, 0
-0x3852, 0x4720, 0x2038, 0x3842, 0x4120, 0x0038,
- IDC_FRAMETEX, 0x403, 11, 0
-0x6f64, 0x276e, 0x2074, 0x6163, 0x6572, "\000"
- IDC_FRAMETEX, 0x403, 12, 0
-0x3452, 0x4720, 0x2034, 0x3442, 0x4120, 0x0034,
- IDC_FRAMETEX, 0x403, 12, 0
-0x3552, 0x4720, 0x2035, 0x3542, 0x4120, 0x0031,
- IDC_FRAMETEX, 0x403, 12, 0
-0x3852, 0x4720, 0x2038, 0x3842, 0x4120, 0x0038,
- IDC_FRAMEREAD, 0x403, 11, 0
-0x6f64, 0x276e, 0x2074, 0x6163, 0x6572, "\000"
- IDC_FRAMEREAD, 0x403, 12, 0
-0x3452, 0x4720, 0x2034, 0x3442, 0x4120, 0x0034,
- IDC_FRAMEREAD, 0x403, 12, 0
-0x3552, 0x4720, 0x2035, 0x3542, 0x4120, 0x0031,
- IDC_FRAMEREAD, 0x403, 12, 0
-0x3852, 0x4720, 0x2038, 0x3842, 0x4120, 0x0038,
- 0
-END
-
-#endif
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// String Table
-//
-
-STRINGTABLE DISCARDABLE
-BEGIN
- IDS_INFO0 "FL - Frame limitation:\n[Off] - Speed as fast as possible\n[On-1] - Limits speed to manual value\n[On-2] - Limits speed to auto-detected value."
- IDS_INFO1 "FS - Frame skipping:\n[Off] - No frames get skipped\n[On] - Tries to speed up the game by skipping frames. Can cause glitches!"
- IDS_INFO2 "OD - Offscreen drawing:\n[0-4] - The higher the mode, the more checks for uploading screen data/software drawing will be done. Setting depends on the game."
- IDS_INFO3 "FI - Texture filtering:\n[0-6] - Filtering will cause glitches! Mode 2/4/6: black borders vanish. Mode 3/4 will not filter sprites. Mode 5/6 will smooth sprites."
- IDS_INFO4 "DI - Dithering:\n[Off] - No dithering\n[On] - Smoother shading in 16 bit modes."
- IDS_INFO5 "AM - Alpha multipass:\n[Off] - Faster with some games, but opaque texture areas can get transparent.\n[On] - Accurate psx emulation."
- IDS_INFO6 "AB - Advanced blending:\n[0-1] - For accurate psx coloring use mode 1. If your gfx card can't do it in hardware, a software mode will be done automatically (slower)."
- IDS_INFO7 "FA - Framebuffer access:\n[0-4] - Some games read back the framebuffer to create special effects. This can be very slow! In mode 4 everything is done in software."
- IDS_INFO8 "FT - Frame buffer texture:\n[0-3] - Mode 2 is trying to do some effects (whirls, motion blur) in hardware (can be slow). Mode 1 is turning the effects off (fastest emulation)."
- IDS_INFO9 "GF - Special game fixes:\n[Off] - Turn off all fixes\n[On] - Turn on all activated fixes. You have to select the fixes you want to use in the gpu config."
-END
-
-#endif // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-#define _AFX_NO_SPLITTER_RESOURCES
-#define _AFX_NO_OLE_RESOURCES
-#define _AFX_NO_TRACKER_RESOURCES
-#define _AFX_NO_PROPERTY_RESOURCES
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE 9, 1
-#pragma code_page(1252)
-#endif
-#endif
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
+//Microsoft Developer Studio generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// Neutral resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
+#ifdef _WIN32
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Bitmap
+//
+
+IDB_GPU BITMAP DISCARDABLE "res\\gpu.bmp"
+#endif // Neutral resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
+ "#define _AFX_NO_OLE_RESOURCES\r\n"
+ "#define _AFX_NO_TRACKER_RESOURCES\r\n"
+ "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
+ "\r\n"
+ "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
+ "#ifdef _WIN32\r\n"
+ "LANGUAGE 9, 1\r\n"
+ "#pragma code_page(1252)\r\n"
+ "#endif\r\n"
+ "#endif\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+#ifndef _MAC
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,78,0,0
+ PRODUCTVERSION 1,78,0,0
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "Comments", "\0"
+ VALUE "CompanyName", "\0"
+ VALUE "FileDescription", "gpuPeopsOpenGL. DLL\0"
+ VALUE "FileVersion", "1, 78, 0, 0\0"
+ VALUE "InternalName", "P.E.Op.S. PSX OpenGL GPU (mod)\0"
+ VALUE "LegalCopyright", "Copyright (C) 1999-2009\0"
+ VALUE "LegalTrademarks", "\0"
+ VALUE "OriginalFilename", "gpuPeopsOpenGL.DLL\0"
+ VALUE "PrivateBuild", "\0"
+ VALUE "ProductName", "gpuPeopsOpenGL Dynamic Link Library\0"
+ VALUE "ProductVersion", "1, 78, 0, 0\0"
+ VALUE "SpecialBuild", "\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
+#endif // !_MAC
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_DIALOG_ABOUT DIALOG DISCARDABLE 0, 0, 258, 165
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "About P.E.Op.S. PSX OpenGL Renderer ..."
+FONT 8, "MS Sans Serif"
+BEGIN
+ DEFPUSHBUTTON "OK",IDOK,98,145,50,14
+ RTEXT "Version:",IDC_STATIC,8,6,49,10
+ RTEXT "Coded by:",IDC_STATIC,8,35,49,10
+ RTEXT "Homepage:",IDC_STATIC,8,53,49,10
+ LTEXT "1.78",IDC_STATIC,60,6,159,9
+ LTEXT "Pete Bernert",IDC_STATIC,60,35,159,10
+ LTEXT "www.pbernert.com",IDC_STATIC,60,53,159,10
+ RTEXT "Release date:",IDC_STATIC,8,17,49,10
+ LTEXT "04/2009",IDC_STATIC,60,17,159,10
+ RTEXT "Thanks to:",IDC_STATIC,8,74,49,10
+ LTEXT "Lewpy - without his infos this driver wouldn't exist",
+ IDC_STATIC,60,74,159,10
+ LTEXT "Duddie && FoxPro - for their public sources",IDC_STATIC,
+ 60,86,159,10
+ LTEXT "My girlfriend Heike - 'Hey, that cloud still looks funny, ",
+ IDC_STATIC,60,112,170,10
+ LTEXT "go on and change it...'",IDC_STATIC,125,121,117,10
+ CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME | SS_SUNKEN,4,68,
+ 249,70
+ LTEXT "Gamma - thanks for your OpenGL book",IDC_STATIC,60,99,
+ 159,10
+END
+
+IDD_CFGDLG DIALOGEX 0, 0, 413, 306
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Configure P.E.Op.S. PSX OpenGL Renderer ..."
+FONT 8, "MS Sans Serif"
+BEGIN
+ CONTROL "Fullscreen mode",IDC_DISPMODE1,"Button",BS_AUTORADIOBUTTON,11,11,73,10
+ CONTROL "Window mode",IDC_DISPMODE2,"Button",BS_AUTORADIOBUTTON,11,25,63,10
+ COMBOBOX IDC_RESOLUTION,150,10,63,64,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_COLORDEPTH,261,10,36,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ EDITTEXT IDC_WINX,150,24,26,12,ES_AUTOHSCROLL
+ EDITTEXT IDC_WINY,187,24,26,12,ES_AUTOHSCROLL
+ CONTROL "Keep psx aspect ratio",IDC_ARATIO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,306,17,95,12
+ COMBOBOX IDC_TEXQUALITY,61,50,159,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_FILTERTYPE,61,63,159,83,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_HIRESTEX,275,50,129,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_VRAMSIZE,275,63,62,88,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
+ CONTROL "Show FPS display on startup",IDC_SHOWFPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,94,107,10
+ PUSHBUTTON "...",IDC_KEYCONFIG,119,94,11,10,0,WS_EX_STATICEDGE
+ CONTROL "Use FPS limit",IDC_USELIMIT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,149,89,73,10
+ CONTROL "Use Frame skipping",IDC_USESKIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,149,101,78,10
+ CONTROL "Auto-detect FPS/Frame skipping limit",IDC_FRAMEAUTO,
+ "Button",BS_AUTORADIOBUTTON | WS_GROUP,258,89,131,9
+ CONTROL "FPS limit (10-200) :",IDC_FRAMEMANUELL,"Button",BS_AUTORADIOBUTTON,258,100,72,10
+ EDITTEXT IDC_FRAMELIMIT,334,99,29,12,ES_AUTOHSCROLL
+ COMBOBOX IDC_OFFSCREEN,78,123,130,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_FRAMETEX,78,136,130,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_FRAMEREAD,78,149,130,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ CONTROL "Alpha MultiPass",IDC_OPAQUE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,219,127,66,10
+ CONTROL "Mask bit",IDC_USEMASK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,219,138,47,10
+ CONTROL "Advanced blending",IDC_ADVBLEND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,219,149,76,10
+ CONTROL "Scanlines",IDC_USESCANLINES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,176,46,10
+ EDITTEXT IDC_SCANBLEND,375,175,29,12,ES_AUTOHSCROLL
+ CONTROL "Line mode",IDC_USELINES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,186,48,10
+ CONTROL "Unfiltered framebuffer updates",IDC_FASTMDEC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,196,113,10
+ CONTROL "Force 15 bit framebuffer updates",IDC_FASTMDEC2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,206,121,10
+ CONTROL "Color dithering",IDC_DRAWDITHER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,216,81,10
+ CONTROL "Screen smoothing",IDC_BLUR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,226,81,10
+ CONTROL "Disable screensaver",IDC_SSAVE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,236,81,10
+ CONTROL "Special game fixes",IDC_GAMEFIX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,246,75,10
+ PUSHBUTTON "...",IDC_SELFIX,89,246,11,10,0,WS_EX_STATICEDGE
+ PUSHBUTTON "Fast",IDC_DEF1,10,282,34,14
+ PUSHBUTTON "Nice",IDC_DEF2,49,282,34,14
+ DEFPUSHBUTTON "OK",IDOK,113,282,84,14
+ PUSHBUTTON "Cancel",IDCANCEL,215,282,84,14
+ PUSHBUTTON "Copy settings\n to clipboard",IDC_CLIPBOARD,322,276,87,25,BS_MULTILINE,WS_EX_STATICEDGE
+ GROUPBOX "Misc",IDC_STATIC,3,166,406,104
+ GROUPBOX "Default settings",IDC_STATIC,3,272,88,30
+ GROUPBOX "Textures",IDC_STATIC,3,41,406,40
+ RTEXT "Desktop resolution:",IDC_STATIC,81,12,65,9
+ GROUPBOX "Resolution && Colors",IDC_STATIC,3,1,406,40
+ RTEXT "Color depth:",IDC_STATIC,219,12,39,9
+ GROUPBOX "Framerate",IDC_STATIC,3,81,406,33
+ LTEXT "FPS",IDC_STATIC,367,100,17,9,SS_CENTERIMAGE
+ GROUPBOX "Compatibility",IDC_STATIC,3,115,406,51
+ RTEXT "Texture quality:",IDC_QUALTXT,6,52,51,9
+ RTEXT "Window size:",IDC_STATIC,85,26,61,9
+ CTEXT "x",IDC_STATIC,177,26,8,9
+ RTEXT "Gfx card vram:",IDC_QUALTXT2,225,65,48,9
+ RTEXT "Off-Screen drawing:",IDC_STATIC,11,124,64,10,SS_CENTERIMAGE
+ RTEXT "Texture filtering:",IDC_STATIC,6,65,52,10
+ RTEXT "Framebuffer textures:",IDC_STATIC,7,137,68,10,SS_CENTERIMAGE
+ LTEXT "Some games will need certain special options to work without glitches",IDC_STATIC,135,246,242,9,SS_CENTERIMAGE
+ LTEXT "Smoother shading in 16 bit color depth",IDC_STATIC,135,216,242,9,SS_CENTERIMAGE
+ LTEXT "Small speed up with mdecs",IDC_STATIC,135,196,242,9,SS_CENTERIMAGE
+ LTEXT "Polygons will not get filled",IDC_STATIC,135,186,89,9,SS_CENTERIMAGE
+ LTEXT "TV screen alike lines",IDC_STATIC,135,176,69,9,SS_CENTERIMAGE
+ LTEXT "Accurate psx color emulation",IDC_STATIC,303,149,97,9,SS_CENTERIMAGE
+ LTEXT "Correct opaque texture areas",IDC_STATIC,302,127,97,9,SS_CENTERIMAGE
+ LTEXT "Needed by a few games",IDC_STATIC,302,138,97,9,SS_CENTERIMAGE
+ RTEXT "Scanline brightness (0...255, -1=Monitor dot matrix):",IDC_STATIC,210,176,162,9,SS_CENTERIMAGE
+ EDITTEXT IDC_CLPEDIT,314,293,6,12,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | NOT WS_VISIBLE
+ LTEXT "MBytes",IDC_QUALTXT3,340,65,27,9
+ LTEXT "The complete screen will get smoothed. Very slow on some cards, lotta vram needed",IDC_STATIC,135,226,269,9,SS_CENTERIMAGE
+ RTEXT "Framebuffer access:",IDC_STATIC,7,150,68,10,SS_CENTERIMAGE
+ LTEXT "Disable screensavers and power saving modes. Not available in Win95/WinNT",IDC_STATIC,135,236,269,9,SS_CENTERIMAGE
+ LTEXT "Speed up with mdecs in 32 bit color depth, but less colorful",IDC_T14_STATIC2,135,206,268,9,SS_CENTERIMAGE
+ RTEXT "Hi-Res textures:",IDC_QUALTXT4,223,52,50,9
+ COMBOBOX IDC_VSYNC,261,24,36,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ RTEXT "V-Sync:",IDC_STATIC,219,26,39,9,SS_CENTERIMAGE
+ CONTROL "Gte accuracy",IDC_GTEACCURACY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,256,59,10
+END
+
+IDD_FIXES DIALOG DISCARDABLE 0, 0, 316, 322
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Special game fixes..."
+FONT 8, "MS Sans Serif"
+BEGIN
+ CONTROL "0x00001: Adjust framebuffer access",IDC_FIX1,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,11,30,133,10
+ CONTROL "0x00004: Ignore black brightness",IDC_FIX3,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,11,60,140,10
+ CONTROL "0x00008: Swap front/back detection",IDC_FIX4,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,11,75,144,10
+ CONTROL "0x00010: Disable coord check",IDC_FIX5,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,11,90,139,10
+ CONTROL "0x00020: Remove blue glitches",IDC_FIX6,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,11,105,139,10
+ CONTROL "0x00040: Mixed software FB access",IDC_FIX7,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,11,120,143,10
+ CONTROL "0x00080: Use PC fps calculation",IDC_FIX8,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,11,135,142,10
+ CONTROL "0x00100: Use old frame skipping",IDC_FIX9,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,11,150,139,10
+ CONTROL "0x00002: Direct framebuffer updates",IDC_FIX2,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,11,45,137,10
+ CONTROL "0x00200: G4 polygon cache",IDC_FIX10,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,11,165,141,10
+ CONTROL "0x00400: Fake subtractive blending",IDC_FIX11,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,11,180,143,10
+ CONTROL "0x00800: Lazy upload detection",IDC_FIX12,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,11,195,144,10
+ CONTROL "0x01000: Odd/even bit hack",IDC_FIX13,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,11,210,143,10
+ CONTROL "0x02000: Expand screen width",IDC_FIX14,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,11,225,144,10
+ DEFPUSHBUTTON "OK",IDOK,83,302,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,182,302,50,14
+ LTEXT "Activate the following options only if you want to play one of the listed games (or if your game is showing similar glitches)!",
+ IDC_STATIC,7,4,246,22
+ LTEXT "ONLY for FF7 battle cursor/battle swirl",IDC_STATIC,163,
+ 30,137,9,SS_CENTERIMAGE
+ LTEXT "Speed up in nasty frame upload situations",IDC_STATIC,
+ 163,45,137,9,SS_CENTERIMAGE
+ LTEXT "Fixes black screens in Lunar",IDC_STATIC,162,60,123,9,
+ SS_CENTERIMAGE
+ LTEXT "Speed freaks, Killer Loop",IDC_STATIC,162,75,90,9,
+ SS_CENTERIMAGE
+ LTEXT "Old coord compatibility mode",IDC_STATIC,162,89,99,9,
+ SS_CENTERIMAGE
+ LTEXT "Leg. o. Dragoon, Alpha Multipass needed",IDC_STATIC,162,
+ 105,136,9,SS_CENTERIMAGE
+ LTEXT "Faster FB access on some systems/ATI",IDC_STATIC,162,
+ 120,125,9,SS_CENTERIMAGE
+ LTEXT "Better fps limitation with some games",IDC_STATIC,162,
+ 135,117,9,SS_CENTERIMAGE
+ LTEXT "Skips only every second frame",IDC_STATIC,162,150,130,9,
+ SS_CENTERIMAGE
+ LTEXT "ONLY for FF9 battle mode... yellow rect",IDC_STATIC,162,
+ 165,132,9,SS_CENTERIMAGE
+ LTEXT "Needed by some (buggy) OpenGL ICDs",IDC_STATIC,162,180,
+ 132,9,SS_CENTERIMAGE
+ LTEXT "DW7 fix (not 100% perfect...)",IDC_STATIC,162,195,132,9,
+ SS_CENTERIMAGE
+ LTEXT "Needed with epsxe 1.5.2 and older",IDC_STATIC,162,210,
+ 138,9,SS_CENTERIMAGE
+ LTEXT "Shows the full area in Capcom 2D fighters",IDC_STATIC,
+ 162,225,138,9,SS_CENTERIMAGE
+ CONTROL "0x04000: Use old texture filtering",IDC_FIX15,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,11,240,141,10
+ LTEXT "Fixes black areas with some cards",IDC_STATIC,162,240,
+ 138,9,SS_CENTERIMAGE
+ CONTROL "0x08000: Special upload detection",IDC_FIX16,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,11,255,146,10
+ LTEXT "May show some additional splash screens",
+ IDC_F14_STATIC3,163,255,137,9,SS_CENTERIMAGE
+ CONTROL "0x10000: Use low-res fps timer",IDC_FIX17,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,11,270,147,10
+ LTEXT "For buggy motherboard chipsets",IDC_F14_STATIC4,163,270,
+ 137,9,SS_CENTERIMAGE
+ CONTROL "0x20000: Fake 'gpu busy' states",IDC_FIX18,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,11,285,147,10
+ LTEXT "Toggles busy flags after drawing",IDC_F14_STATIC5,163,
+ 285,137,9,SS_CENTERIMAGE
+END
+
+IDD_KEYS DIALOG DISCARDABLE 0, 0, 186, 162
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
+CAPTION "GPU key configuration"
+FONT 8, "MS Sans Serif"
+BEGIN
+ PUSHBUTTON "Default keys",IDC_DEFAULT,107,6,61,13
+ COMBOBOX IDC_KEY1,108,25,61,62,CBS_DROPDOWNLIST | WS_VSCROLL |
+ WS_TABSTOP
+ COMBOBOX IDC_KEY2,108,41,61,62,CBS_DROPDOWNLIST | WS_VSCROLL |
+ WS_TABSTOP
+ COMBOBOX IDC_KEY3,108,57,61,62,CBS_DROPDOWNLIST | WS_VSCROLL |
+ WS_TABSTOP
+ COMBOBOX IDC_KEY4,108,73,61,62,CBS_DROPDOWNLIST | WS_VSCROLL |
+ WS_TABSTOP
+ COMBOBOX IDC_KEY5,108,89,61,62,CBS_DROPDOWNLIST | WS_VSCROLL |
+ WS_TABSTOP
+ COMBOBOX IDC_KEY6,108,105,61,62,CBS_DROPDOWNLIST | WS_VSCROLL |
+ WS_TABSTOP
+ DEFPUSHBUTTON "OK",IDOK,19,142,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,115,142,50,14
+ RTEXT "Show/hide gpu menu:",IDC_STATIC,4,26,100,9,
+ SS_CENTERIMAGE
+ RTEXT "Show/hide gpu infos:",IDC_STATIC,4,42,100,9,
+ SS_CENTERIMAGE
+ RTEXT "Toggle selected option up:",IDC_STATIC,4,58,100,9,
+ SS_CENTERIMAGE
+ RTEXT "Toggle selected option down:",IDC_STATIC,4,74,100,9,
+ SS_CENTERIMAGE
+ RTEXT "Select previous option:",IDC_STATIC,4,90,100,9,
+ SS_CENTERIMAGE
+ RTEXT "Select next option:",IDC_STATIC,4,106,100,9,
+ SS_CENTERIMAGE
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO DISCARDABLE
+BEGIN
+ IDD_DIALOG_ABOUT, DIALOG
+ BEGIN
+ LEFTMARGIN, 2
+ RIGHTMARGIN, 253
+ TOPMARGIN, 3
+ BOTTOMMARGIN, 159
+ END
+
+ IDD_CFGDLG, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 406
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 288
+ END
+
+ IDD_FIXES, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 309
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 315
+ END
+
+ IDD_KEYS, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 179
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 155
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog Info
+//
+#ifdef _MSC_VER
+
+IDD_CFGDLG DLGINIT
+BEGIN
+ IDC_RESOLUTION, 0x403, 1, 0
+"\000"
+ IDC_COLORDEPTH, 0x403, 7, 0
+0x3631, 0x4220, 0x7469, "\000"
+ IDC_COLORDEPTH, 0x403, 7, 0
+0x3233, 0x4220, 0x7469, "\000"
+ IDC_TEXQUALITY, 0x403, 11, 0
+0x6f64, 0x276e, 0x2074, 0x6163, 0x6572, "\000"
+ IDC_TEXQUALITY, 0x403, 12, 0
+0x3452, 0x4720, 0x2034, 0x3442, 0x4120, 0x0034,
+ IDC_TEXQUALITY, 0x403, 12, 0
+0x3552, 0x4720, 0x2035, 0x3542, 0x4120, 0x0031,
+ IDC_TEXQUALITY, 0x403, 12, 0
+0x3852, 0x4720, 0x2038, 0x3842, 0x4120, 0x0038,
+ IDC_FILTERTYPE, 0x403, 9, 0
+0x7453, 0x6e61, 0x6164, 0x6472, "\000"
+ IDC_FILTERTYPE, 0x403, 9, 0
+0x7845, 0x6574, 0x646e, 0x6465, "\000"
+ IDC_FILTERTYPE, 0x403, 22, 0
+0x7453, 0x6e61, 0x6164, 0x6472, 0x2820, 0x6f6e, 0x5320, 0x7270, 0x7469,
+0x7365, 0x0029,
+ IDC_FILTERTYPE, 0x403, 22, 0
+0x7845, 0x6574, 0x646e, 0x6465, 0x2820, 0x6f6e, 0x5320, 0x7270, 0x7469,
+0x7365, 0x0029,
+ IDC_HIRESTEX, 0x403, 11, 0
+0x6f64, 0x276e, 0x2074, 0x6163, 0x6572, "\000"
+ IDC_HIRESTEX, 0x403, 12, 0
+0x3452, 0x4720, 0x2034, 0x3442, 0x4120, 0x0034,
+ IDC_HIRESTEX, 0x403, 12, 0
+0x3552, 0x4720, 0x2035, 0x3542, 0x4120, 0x0031,
+ IDC_HIRESTEX, 0x403, 12, 0
+0x3852, 0x4720, 0x2038, 0x3842, 0x4120, 0x0038,
+ IDC_OFFSCREEN, 0x403, 11, 0
+0x6f64, 0x276e, 0x2074, 0x6163, 0x6572, "\000"
+ IDC_OFFSCREEN, 0x403, 12, 0
+0x3452, 0x4720, 0x2034, 0x3442, 0x4120, 0x0034,
+ IDC_OFFSCREEN, 0x403, 12, 0
+0x3552, 0x4720, 0x2035, 0x3542, 0x4120, 0x0031,
+ IDC_OFFSCREEN, 0x403, 12, 0
+0x3852, 0x4720, 0x2038, 0x3842, 0x4120, 0x0038,
+ IDC_FRAMETEX, 0x403, 11, 0
+0x6f64, 0x276e, 0x2074, 0x6163, 0x6572, "\000"
+ IDC_FRAMETEX, 0x403, 12, 0
+0x3452, 0x4720, 0x2034, 0x3442, 0x4120, 0x0034,
+ IDC_FRAMETEX, 0x403, 12, 0
+0x3552, 0x4720, 0x2035, 0x3542, 0x4120, 0x0031,
+ IDC_FRAMETEX, 0x403, 12, 0
+0x3852, 0x4720, 0x2038, 0x3842, 0x4120, 0x0038,
+ IDC_FRAMEREAD, 0x403, 11, 0
+0x6f64, 0x276e, 0x2074, 0x6163, 0x6572, "\000"
+ IDC_FRAMEREAD, 0x403, 12, 0
+0x3452, 0x4720, 0x2034, 0x3442, 0x4120, 0x0034,
+ IDC_FRAMEREAD, 0x403, 12, 0
+0x3552, 0x4720, 0x2035, 0x3542, 0x4120, 0x0031,
+ IDC_FRAMEREAD, 0x403, 12, 0
+0x3852, 0x4720, 0x2038, 0x3842, 0x4120, 0x0038,
+ 0
+END
+
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_INFO0 "FL - Frame limitation:\n[Off] - Speed as fast as possible\n[On-1] - Limits speed to manual value\n[On-2] - Limits speed to auto-detected value."
+ IDS_INFO1 "FS - Frame skipping:\n[Off] - No frames get skipped\n[On] - Tries to speed up the game by skipping frames. Can cause glitches!"
+ IDS_INFO2 "OD - Offscreen drawing:\n[0-4] - The higher the mode, the more checks for uploading screen data/software drawing will be done. Setting depends on the game."
+ IDS_INFO3 "FI - Texture filtering:\n[0-6] - Filtering will cause glitches! Mode 2/4/6: black borders vanish. Mode 3/4 will not filter sprites. Mode 5/6 will smooth sprites."
+ IDS_INFO4 "DI - Dithering:\n[Off] - No dithering\n[On] - Smoother shading in 16 bit modes."
+ IDS_INFO5 "AM - Alpha multipass:\n[Off] - Faster with some games, but opaque texture areas can get transparent.\n[On] - Accurate psx emulation."
+ IDS_INFO6 "AB - Advanced blending:\n[0-1] - For accurate psx coloring use mode 1. If your gfx card can't do it in hardware, a software mode will be done automatically (slower)."
+ IDS_INFO7 "FA - Framebuffer access:\n[0-4] - Some games read back the framebuffer to create special effects. This can be very slow! In mode 4 everything is done in software."
+ IDS_INFO8 "FT - Frame buffer texture:\n[0-3] - Mode 2 is trying to do some effects (whirls, motion blur) in hardware (can be slow). Mode 1 is turning the effects off (fastest emulation)."
+ IDS_INFO9 "GF - Special game fixes:\n[Off] - Turn off all fixes\n[On] - Turn on all activated fixes. You have to select the fixes you want to use in the gpu config."
+END
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+#define _AFX_NO_SPLITTER_RESOURCES
+#define _AFX_NO_OLE_RESOURCES
+#define _AFX_NO_TRACKER_RESOURCES
+#define _AFX_NO_PROPERTY_RESOURCES
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE 9, 1
+#pragma code_page(1252)
+#endif
+#endif
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/win32/plugins/peopsxgl/gpuPeopsOpenGL.vcproj b/win32/plugins/peopsxgl/gpuPeopsOpenGL.vcproj
index de479eb9..cfa3ea52 100644..100755
--- a/win32/plugins/peopsxgl/gpuPeopsOpenGL.vcproj
+++ b/win32/plugins/peopsxgl/gpuPeopsOpenGL.vcproj
@@ -1,560 +1,560 @@
-<?xml version="1.0" encoding="gb2312"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="gpuPeopsOpenGL"
- ProjectGUID="{726BDE88-F2AD-4666-A4BC-5858F973976E}"
- RootNamespace="gpuPeopsOpenGL"
- TargetFrameworkVersion="0"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory=".\Debug"
- IntermediateDirectory=".\Debug"
- ConfigurationType="2"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- PreprocessorDefinitions="_DEBUG"
- MkTypLibCompatible="true"
- SuppressStartupBanner="true"
- TargetEnvironment="1"
- TypeLibraryName=".\Debug/gpuPeopsOpenGL.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=".\,.\winsrc,..\..\glue,..\..\..\plugins\peopsxgl,..\..\..\libpcsxcore"
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- PrecompiledHeaderFile=".\Debug/gpuPeopsOpenGL.pch"
- AssemblerListingLocation=".\Debug/"
- ObjectFile=".\Debug/"
- ProgramDataBaseFileName=".\Debug/"
- WarningLevel="3"
- SuppressStartupBanner="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1031"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="opengl32.lib winmm.lib"
- OutputFile=".\Debug/gpuPeopsOpenGL.dll"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- ModuleDefinitionFile=".\gpuPeopsOpenGL.def"
- GenerateDebugInformation="true"
- ProgramDatabaseFile=".\Debug/gpuPeopsOpenGL.pdb"
- SubSystem="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- ImportLibrary=".\Debug/gpuPeopsOpenGL.lib"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- OutputFile=".\Debug/gpuPeopsOpenGL.bsc"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory=".\Release"
- IntermediateDirectory=".\Release"
- ConfigurationType="2"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- PreprocessorDefinitions="NDEBUG"
- MkTypLibCompatible="true"
- SuppressStartupBanner="true"
- TargetEnvironment="1"
- TypeLibraryName=".\Release/gpuPeopsOpenGL.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories=".\,.\winsrc,..\..\glue,..\..\..\plugins\peopsxgl,..\..\..\libpcsxcore"
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- PrecompiledHeaderFile=".\Release/gpuPeopsOpenGL.pch"
- AssemblerListingLocation=".\Release/"
- ObjectFile=".\Release/"
- ProgramDataBaseFileName=".\Release/"
- BrowseInformation="1"
- WarningLevel="3"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1031"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="opengl32.lib winmm.lib"
- OutputFile=".\Release/gpuPeopsOpenGL.dll"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- ModuleDefinitionFile=".\gpuPeopsOpenGL.def"
- ProgramDatabaseFile=".\Release/gpuPeopsOpenGL.pdb"
- SubSystem="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- ImportLibrary=".\Release/gpuPeopsOpenGL.lib"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- OutputFile=".\Release/gpuPeopsOpenGL.bsc"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine="rem copy release\*.dll d:\emus\epsxe\plugins"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="winsrc"
- >
- <File
- RelativePath="winsrc\cfg.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="winsrc\fps.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="winsrc\key.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="winsrc\ssave.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="winsrc\ssave.h"
- >
- </File>
- <File
- RelativePath="winsrc\winmain.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="peopsxgl"
- >
- <File
- RelativePath="..\..\..\plugins\peopsxgl\cfg.h"
- >
- </File>
- <File
- RelativePath="..\..\..\plugins\peopsxgl\draw.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\plugins\peopsxgl\draw.h"
- >
- </File>
- <File
- RelativePath="..\..\..\plugins\peopsxgl\externals.h"
- >
- </File>
- <File
- RelativePath="..\..\..\plugins\peopsxgl\fps.h"
- >
- </File>
- <File
- RelativePath="..\..\..\plugins\peopsxgl\gl_ext.h"
- >
- </File>
- <File
- RelativePath="..\..\..\plugins\peopsxgl\gpu.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\plugins\peopsxgl\gpu.h"
- >
- </File>
- <File
- RelativePath="..\..\..\plugins\peopsxgl\gte_accuracy.c"
- >
- </File>
- <File
- RelativePath="..\..\..\plugins\peopsxgl\gte_accuracy.h"
- >
- </File>
- <File
- RelativePath="..\..\..\plugins\peopsxgl\key.h"
- >
- </File>
- <File
- RelativePath="..\..\..\plugins\peopsxgl\menu.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\plugins\peopsxgl\menu.h"
- >
- </File>
- <File
- RelativePath="..\..\..\plugins\peopsxgl\prim.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\plugins\peopsxgl\prim.h"
- >
- </File>
- <File
- RelativePath="..\..\..\plugins\peopsxgl\soft.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\plugins\peopsxgl\soft.h"
- >
- </File>
- <File
- RelativePath="..\..\..\plugins\peopsxgl\stdafx.h"
- >
- </File>
- <File
- RelativePath="..\..\..\plugins\peopsxgl\texture.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\plugins\peopsxgl\texture.h"
- >
- </File>
- </Filter>
- <File
- RelativePath=".\res\gpu.bmp"
- >
- </File>
- <File
- RelativePath="gpuPeopsOpenGL.def"
- >
- </File>
- <File
- RelativePath="gpuPeopsOpenGL.rc"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="resource.h"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+<?xml version="1.0" encoding="gb2312"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="gpuPeopsOpenGL"
+ ProjectGUID="{726BDE88-F2AD-4666-A4BC-5858F973976E}"
+ RootNamespace="gpuPeopsOpenGL"
+ TargetFrameworkVersion="0"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/gpuPeopsOpenGL.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".\,.\winsrc,..\..\glue,..\..\..\plugins\peopsxgl,..\..\..\libpcsxcore"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ PrecompiledHeaderFile=".\Debug/gpuPeopsOpenGL.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1031"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="opengl32.lib winmm.lib"
+ OutputFile=".\Debug/gpuPeopsOpenGL.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\gpuPeopsOpenGL.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/gpuPeopsOpenGL.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\Debug/gpuPeopsOpenGL.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\Debug/gpuPeopsOpenGL.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/gpuPeopsOpenGL.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories=".\,.\winsrc,..\..\glue,..\..\..\plugins\peopsxgl,..\..\..\libpcsxcore"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile=".\Release/gpuPeopsOpenGL.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ BrowseInformation="1"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1031"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="opengl32.lib winmm.lib"
+ OutputFile=".\Release/gpuPeopsOpenGL.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\gpuPeopsOpenGL.def"
+ ProgramDatabaseFile=".\Release/gpuPeopsOpenGL.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\Release/gpuPeopsOpenGL.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\Release/gpuPeopsOpenGL.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="rem copy release\*.dll d:\emus\epsxe\plugins"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="winsrc"
+ >
+ <File
+ RelativePath="winsrc\cfg.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="winsrc\fps.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="winsrc\key.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="winsrc\ssave.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="winsrc\ssave.h"
+ >
+ </File>
+ <File
+ RelativePath="winsrc\winmain.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="peopsxgl"
+ >
+ <File
+ RelativePath="..\..\..\plugins\peopsxgl\cfg.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\plugins\peopsxgl\draw.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\plugins\peopsxgl\draw.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\plugins\peopsxgl\externals.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\plugins\peopsxgl\fps.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\plugins\peopsxgl\gl_ext.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\plugins\peopsxgl\gpu.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\plugins\peopsxgl\gpu.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\plugins\peopsxgl\gte_accuracy.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\plugins\peopsxgl\gte_accuracy.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\plugins\peopsxgl\key.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\plugins\peopsxgl\menu.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\plugins\peopsxgl\menu.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\plugins\peopsxgl\prim.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\plugins\peopsxgl\prim.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\plugins\peopsxgl\soft.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\plugins\peopsxgl\soft.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\plugins\peopsxgl\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\plugins\peopsxgl\texture.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\plugins\peopsxgl\texture.h"
+ >
+ </File>
+ </Filter>
+ <File
+ RelativePath=".\res\gpu.bmp"
+ >
+ </File>
+ <File
+ RelativePath="gpuPeopsOpenGL.def"
+ >
+ </File>
+ <File
+ RelativePath="gpuPeopsOpenGL.rc"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="resource.h"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/win32/plugins/peopsxgl/resource.h b/win32/plugins/peopsxgl/resource.h
index 8d59b103..c30e0fb4 100644..100755
--- a/win32/plugins/peopsxgl/resource.h
+++ b/win32/plugins/peopsxgl/resource.h
@@ -1,134 +1,134 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by gpuPeopsOpenGL.rc
-//
-#define IDS_INFO0 1
-#define IDS_INFO1 2
-#define IDS_INFO2 3
-#define IDC_DEFAULT 3
-#define IDS_INFO3 4
-#define IDS_INFO4 5
-#define IDS_INFO5 6
-#define IDS_INFO6 7
-#define IDS_INFO7 8
-#define IDS_INFO8 9
-#define IDS_INFO9 10
-#define IDC_DEF1 127
-#define IDC_DEF2 128
-#define IDD_DIALOG_ABOUT 129
-#define IDD_CFGDLG 130
-#define IDD_FIXES 134
-#define IDB_GPU 135
-#define IDD_KEYS 138
-#define IDC_TEXWINDOWS 1001
-#define IDC_TEXFIX 1002
-#define IDC_TEXLINEAR 1003
-#define IDC_RESOLUTION 1004
-#define IDC_DRAWDITHER 1005
-#define IDC_CACHESIZE 1006
-#define IDC_BLUR 1007
-#define IDC_CACHETXT 1008
-#define IDC_SSAVE 1009
-#define IDC_USELINES 1010
-#define IDC_COLORDEPTH 1011
-#define IDC_CHANGEDESK 1012
-#define IDC_VSYNC 1012
-#define IDC_USELIMIT 1013
-#define IDC_FRAMELIMIT 1014
-#define IDC_FRAMEAUTO 1015
-#define IDC_FRAMEMANUELL 1016
-#define IDC_ADVBLEND 1017
-#define IDC_OFFSCREEN 1018
-#define IDC_OPAQUE 1019
-#define IDC_TEXQUALITY 1020
-#define IDC_USESKIP 1021
-#define IDC_DISPMODE1 1022
-#define IDC_DISPMODE2 1023
-#define IDC_SUBCACHE 1024
-#define IDC_VRAMSIZE 1025
-#define IDC_WINDOWFREE 1026
-#define IDC_EXTCOLCHECK 1027
-#define IDC_FRAMETEX 1028
-#define IDC_WINDOWAUTO 1029
-#define IDC_USETEXPRIO 1030
-#define IDC_SHOWFPS 1031
-#define IDC_WINX 1032
-#define IDC_WINY 1033
-#define IDC_FILTERTYPE 1034
-#define IDC_USEANTIALIAS 1035
-#define IDC_SCANBLEND 1036
-#define IDC_3DGLASSES 1037
-#define IDC_USESCANLINES 1038
-#define IDC_KEY1 1039
-#define IDC_KEY2 1040
-#define IDC_KEY3 1041
-#define IDC_KEY4 1042
-#define IDC_KEY5 1043
-#define IDC_KEY6 1044
-#define IDC_USEMASK 1045
-#define IDC_FASTMDEC 1046
-#define IDC_FULLVRAM 1047
-#define IDC_FRAMEREAD 1048
-#define IDC_ARATIO 1049
-#define IDC_CLIPBOARD 1050
-#define IDC_CLPEDIT 1051
-#define IDC_QUALTXT 1052
-#define IDC_QUALTXT2 1053
-#define IDC_QUALTXT3 1054
-#define IDC_GARBAGE 1055
-#define IDC_PALTEXWND 1056
-#define IDC_HIRESTEX 1057
-#define IDC_GAMEFIX 1058
-#define IDC_SELFIX 1059
-#define IDC_KEYCONFIG 1060
-#define IDC_T14_STATIC2 1061
-#define IDC_FASTMDEC2 1062
-#define IDC_QUALTXT4 1063
-#define IDC_GAMEFIX2 1064
-#define IDC_GTEACCURACY 1065
-#define IDC_F14_STATIC3 1083
-#define IDC_F14_STATIC4 1084
-#define IDC_F14_STATIC5 1085
-#define IDC_FIX1 2038
-#define IDC_FIX2 2039
-#define IDC_FIX3 2040
-#define IDC_FIX4 2041
-#define IDC_FIX5 2042
-#define IDC_FIX6 2043
-#define IDC_FIX7 2044
-#define IDC_FIX8 2045
-#define IDC_FIX9 2046
-#define IDC_FIX10 2047
-#define IDC_FIX11 2048
-#define IDC_FIX12 2049
-#define IDC_FIX13 2050
-#define IDC_FIX14 2051
-#define IDC_FIX15 2052
-#define IDC_FIX16 2053
-#define IDC_FIX17 2054
-#define IDC_FIX18 2055
-#define IDC_FIX19 2056
-#define IDC_FIX20 2057
-#define IDC_FIX21 2058
-#define IDC_FIX22 2059
-#define IDC_FIX23 2060
-#define IDC_FIX24 2061
-#define IDC_FIX25 2062
-#define IDC_FIX26 2063
-#define IDC_FIX27 2064
-#define IDC_FIX28 2065
-#define IDC_FIX29 2066
-#define IDC_FIX30 2067
-#define IDC_FIX31 2068
-#define IDC_FIX32 2069
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 140
-#define _APS_NEXT_COMMAND_VALUE 32771
-#define _APS_NEXT_CONTROL_VALUE 2070
-#define _APS_NEXT_SYMED_VALUE 101
-#endif
-#endif
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by gpuPeopsOpenGL.rc
+//
+#define IDS_INFO0 1
+#define IDS_INFO1 2
+#define IDS_INFO2 3
+#define IDC_DEFAULT 3
+#define IDS_INFO3 4
+#define IDS_INFO4 5
+#define IDS_INFO5 6
+#define IDS_INFO6 7
+#define IDS_INFO7 8
+#define IDS_INFO8 9
+#define IDS_INFO9 10
+#define IDC_DEF1 127
+#define IDC_DEF2 128
+#define IDD_DIALOG_ABOUT 129
+#define IDD_CFGDLG 130
+#define IDD_FIXES 134
+#define IDB_GPU 135
+#define IDD_KEYS 138
+#define IDC_TEXWINDOWS 1001
+#define IDC_TEXFIX 1002
+#define IDC_TEXLINEAR 1003
+#define IDC_RESOLUTION 1004
+#define IDC_DRAWDITHER 1005
+#define IDC_CACHESIZE 1006
+#define IDC_BLUR 1007
+#define IDC_CACHETXT 1008
+#define IDC_SSAVE 1009
+#define IDC_USELINES 1010
+#define IDC_COLORDEPTH 1011
+#define IDC_CHANGEDESK 1012
+#define IDC_VSYNC 1012
+#define IDC_USELIMIT 1013
+#define IDC_FRAMELIMIT 1014
+#define IDC_FRAMEAUTO 1015
+#define IDC_FRAMEMANUELL 1016
+#define IDC_ADVBLEND 1017
+#define IDC_OFFSCREEN 1018
+#define IDC_OPAQUE 1019
+#define IDC_TEXQUALITY 1020
+#define IDC_USESKIP 1021
+#define IDC_DISPMODE1 1022
+#define IDC_DISPMODE2 1023
+#define IDC_SUBCACHE 1024
+#define IDC_VRAMSIZE 1025
+#define IDC_WINDOWFREE 1026
+#define IDC_EXTCOLCHECK 1027
+#define IDC_FRAMETEX 1028
+#define IDC_WINDOWAUTO 1029
+#define IDC_USETEXPRIO 1030
+#define IDC_SHOWFPS 1031
+#define IDC_WINX 1032
+#define IDC_WINY 1033
+#define IDC_FILTERTYPE 1034
+#define IDC_USEANTIALIAS 1035
+#define IDC_SCANBLEND 1036
+#define IDC_3DGLASSES 1037
+#define IDC_USESCANLINES 1038
+#define IDC_KEY1 1039
+#define IDC_KEY2 1040
+#define IDC_KEY3 1041
+#define IDC_KEY4 1042
+#define IDC_KEY5 1043
+#define IDC_KEY6 1044
+#define IDC_USEMASK 1045
+#define IDC_FASTMDEC 1046
+#define IDC_FULLVRAM 1047
+#define IDC_FRAMEREAD 1048
+#define IDC_ARATIO 1049
+#define IDC_CLIPBOARD 1050
+#define IDC_CLPEDIT 1051
+#define IDC_QUALTXT 1052
+#define IDC_QUALTXT2 1053
+#define IDC_QUALTXT3 1054
+#define IDC_GARBAGE 1055
+#define IDC_PALTEXWND 1056
+#define IDC_HIRESTEX 1057
+#define IDC_GAMEFIX 1058
+#define IDC_SELFIX 1059
+#define IDC_KEYCONFIG 1060
+#define IDC_T14_STATIC2 1061
+#define IDC_FASTMDEC2 1062
+#define IDC_QUALTXT4 1063
+#define IDC_GAMEFIX2 1064
+#define IDC_GTEACCURACY 1065
+#define IDC_F14_STATIC3 1083
+#define IDC_F14_STATIC4 1084
+#define IDC_F14_STATIC5 1085
+#define IDC_FIX1 2038
+#define IDC_FIX2 2039
+#define IDC_FIX3 2040
+#define IDC_FIX4 2041
+#define IDC_FIX5 2042
+#define IDC_FIX6 2043
+#define IDC_FIX7 2044
+#define IDC_FIX8 2045
+#define IDC_FIX9 2046
+#define IDC_FIX10 2047
+#define IDC_FIX11 2048
+#define IDC_FIX12 2049
+#define IDC_FIX13 2050
+#define IDC_FIX14 2051
+#define IDC_FIX15 2052
+#define IDC_FIX16 2053
+#define IDC_FIX17 2054
+#define IDC_FIX18 2055
+#define IDC_FIX19 2056
+#define IDC_FIX20 2057
+#define IDC_FIX21 2058
+#define IDC_FIX22 2059
+#define IDC_FIX23 2060
+#define IDC_FIX24 2061
+#define IDC_FIX25 2062
+#define IDC_FIX26 2063
+#define IDC_FIX27 2064
+#define IDC_FIX28 2065
+#define IDC_FIX29 2066
+#define IDC_FIX30 2067
+#define IDC_FIX31 2068
+#define IDC_FIX32 2069
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 140
+#define _APS_NEXT_COMMAND_VALUE 32771
+#define _APS_NEXT_CONTROL_VALUE 2070
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/win32/plugins/peopsxgl/winsrc/cfg.c b/win32/plugins/peopsxgl/winsrc/cfg.c
index 99c29b27..eef8f650 100644..100755
--- a/win32/plugins/peopsxgl/winsrc/cfg.c
+++ b/win32/plugins/peopsxgl/winsrc/cfg.c
@@ -1,1041 +1,1041 @@
-/***************************************************************************
- cfg.c - description
- -------------------
- begin : Sun Mar 08 2009
- copyright : (C) 1999-2009 by Pete Bernert
- web : www.pbernert.com
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. See also the license.txt file for *
- * additional informations. *
- * *
- ***************************************************************************/
-
-#define _IN_CFG
-
-/////////////////////////////////////////////////////////////////////////////
-// Windows config handling
-
-#include "stdafx.h"
-#include "resource.h"
-#include "externals.h"
-#include "cfg.h"
-#include <stdio.h>
-
-char szKeyDefaults[7]={VK_DELETE,VK_INSERT,VK_HOME,VK_END,VK_PRIOR,VK_NEXT,0x00};
-
-/////////////////////////////////////////////////////////////////////////////
-// CCfgDlg dialog
-
-BOOL OnInitCfgDialog(HWND hW);
-void OnCfgOK(HWND hW);
-void OnCfgCancel(HWND hW);
-void OnCfgDef1(HWND hW);
-void OnCfgDef2(HWND hW);
-void OnBugFixes(HWND hW);
-void OnKeyConfig(HWND hW);
-void GetSettings(HWND hW);
-void OnClipboard(HWND hW);
-char * GetConfigInfos(HWND hWE);
-
-BOOL CALLBACK CfgDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- switch(uMsg)
- {
- case WM_INITDIALOG:
- return OnInitCfgDialog(hW);
-
- case WM_COMMAND:
- {
- switch(LOWORD(wParam))
- {
- case IDC_DEF1: OnCfgDef1(hW); return TRUE;
- case IDC_DEF2: OnCfgDef2(hW); return TRUE;
- case IDC_SELFIX: OnBugFixes(hW); return TRUE;
- case IDC_KEYCONFIG: OnKeyConfig(hW); return TRUE;
- case IDCANCEL: OnCfgCancel(hW); return TRUE;
- case IDOK: OnCfgOK(hW); return TRUE;
- case IDC_CLIPBOARD: OnClipboard(hW); return TRUE;
- }
- }
- }
- return FALSE;
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// CCfgDlg message handlers
-
-////////////////////////////////////////////////////////////////////////
-// init dlg
-////////////////////////////////////////////////////////////////////////
-
-void ComboBoxAddRes(HWND hWC,char * cs) // ADD COMBOBOX RESOURCES
-{
- int i=ComboBox_FindString(hWC,-1,cs);
- if(i!=CB_ERR) return;
- ComboBox_AddString(hWC,cs);
-}
-
-
-BOOL OnInitCfgDialog(HWND hW) // INIT CONFIG DIALOG
-{
- HWND hWC;char cs[256];int i;DEVMODE dv;
-
- ReadConfig(); // read registry stuff
-
- //----------------------------------------------------// fill combo with available resolutions
-
- hWC=GetDlgItem(hW,IDC_RESOLUTION);
-
- memset(&dv,0,sizeof(DEVMODE));
- dv.dmSize=sizeof(DEVMODE);
- i=0;
-
- while(EnumDisplaySettings(NULL,i,&dv)) // add all resolutions from the driver
- {
- wsprintf(cs,"%4d x %4d",dv.dmPelsWidth,dv.dmPelsHeight);
- ComboBoxAddRes(hWC,cs);
- i++;
- }
-
- ComboBoxAddRes(hWC," 640 x 480"); // and also add some common ones
- ComboBoxAddRes(hWC," 800 x 600");
- ComboBoxAddRes(hWC,"1024 x 768");
- ComboBoxAddRes(hWC,"1152 x 864");
- ComboBoxAddRes(hWC,"1280 x 1024");
- ComboBoxAddRes(hWC,"1600 x 1200");
-
- wsprintf(cs,"%4d x %4d",iResX,iResY); // search curr resolution in combo
- i=ComboBox_FindString(hWC,-1,cs);
- if(i==CB_ERR) i=0;
- ComboBox_SetCurSel(hWC,i); // and select this one
-
- //----------------------------------------------------// window size
-
- SetDlgItemInt(hW,IDC_WINX,LOWORD(iWinSize),FALSE);
- SetDlgItemInt(hW,IDC_WINY,HIWORD(iWinSize),FALSE);
-
- //----------------------------------------------------// color depth
-
- hWC=GetDlgItem(hW,IDC_COLORDEPTH);
- ComboBox_AddString(hWC,"16 Bit");
- ComboBox_AddString(hWC,"32 Bit");
- wsprintf(cs,"%d Bit",iColDepth);
- i=ComboBox_FindString(hWC,-1,cs);
- if(i==CB_ERR) i=0;
- ComboBox_SetCurSel(hWC,i);
-
- //----------------------------------------------------// vsync
-
- hWC=GetDlgItem(hW,IDC_VSYNC);
- ComboBox_AddString(hWC,"Driver");
- ComboBox_AddString(hWC,"Off");
- ComboBox_AddString(hWC,"On");
- ComboBox_SetCurSel(hWC,iForceVSync+1);
-
- //----------------------------------------------------// vram size
-
- hWC=GetDlgItem(hW,IDC_VRAMSIZE);
- ComboBox_AddString(hWC,"0 (Autodetect)");
- ComboBox_AddString(hWC,"2");
- ComboBox_AddString(hWC,"4");
- ComboBox_AddString(hWC,"8");
- ComboBox_AddString(hWC,"16");
- ComboBox_AddString(hWC,"32");
- ComboBox_AddString(hWC,"64");
- ComboBox_AddString(hWC,"128 (or more)");
-
- if(!iVRamSize) ComboBox_SetCurSel(hWC,0);
- else {wsprintf(cs,"%d",iVRamSize);ComboBox_SetText(hWC,cs);}
-
- //----------------------------------------------------// texture quality
-
- hWC=GetDlgItem(hW,IDC_TEXQUALITY);
- ComboBox_AddString(hWC,"don't care - Use driver's default textures");
- ComboBox_AddString(hWC,"R4 G4 B4 A4 - Fast, but less colorful");
- ComboBox_AddString(hWC,"R5 G5 B5 A1 - Nice colors, bad transparency");
- ComboBox_AddString(hWC,"R8 G8 B8 A8 - Best colors, more ram needed");
- ComboBox_AddString(hWC,"B8 G8 R8 A8 - Slightly faster with some cards");
- ComboBox_SetCurSel(hWC,iTexQuality);
-
- //----------------------------------------------------// all kind of on/off options
-
- if(bDrawDither) CheckDlgButton(hW,IDC_DRAWDITHER,TRUE);
- if(bUseLines) CheckDlgButton(hW,IDC_USELINES,TRUE);
- if(bUseFrameLimit) CheckDlgButton(hW,IDC_USELIMIT,TRUE);
- if(bUseFrameSkip) CheckDlgButton(hW,IDC_USESKIP,TRUE);
- if(bAdvancedBlend) CheckDlgButton(hW,IDC_ADVBLEND,TRUE);
- if(bOpaquePass) CheckDlgButton(hW,IDC_OPAQUE,TRUE);
-// if(bUseAntiAlias) CheckDlgButton(hW,IDC_USEANTIALIAS,TRUE);
- if(bWindowMode) CheckDlgButton(hW,IDC_DISPMODE2,TRUE);
- else CheckDlgButton(hW,IDC_DISPMODE1,TRUE);
- if(iUseMask) CheckDlgButton(hW,IDC_USEMASK,TRUE);
- if(bUseFastMdec) CheckDlgButton(hW,IDC_FASTMDEC,TRUE);
- if(bUse15bitMdec) CheckDlgButton(hW,IDC_FASTMDEC2,TRUE);
- if(bUseFixes) CheckDlgButton(hW,IDC_GAMEFIX,TRUE);
- if(bGteAccuracy) CheckDlgButton(hW,IDC_GTEACCURACY,TRUE);
- if(iUseScanLines) CheckDlgButton(hW,IDC_USESCANLINES,TRUE);
- if(iShowFPS) CheckDlgButton(hW,IDC_SHOWFPS,TRUE);
- if(bKeepRatio) CheckDlgButton(hW,IDC_ARATIO,TRUE);
- if(iBlurBuffer) CheckDlgButton(hW,IDC_BLUR,TRUE);
- if(iNoScreenSaver) CheckDlgButton(hW,IDC_SSAVE,TRUE);
-
- //----------------------------------------------------// texture filter
-
- hWC=GetDlgItem(hW,IDC_FILTERTYPE);
- ComboBox_AddString(hWC,"0: None");
- ComboBox_AddString(hWC,"1: Standard - Glitches will happen");
- ComboBox_AddString(hWC,"2: Extended - Removes black borders");
- ComboBox_AddString(hWC,"3: Standard w/o Sprites - unfiltered 2D");
- ComboBox_AddString(hWC,"4: Extended w/o Sprites - unfiltered 2D");
- ComboBox_AddString(hWC,"5: Standard + smoothed Sprites");
- ComboBox_AddString(hWC,"6: Extended + smoothed Sprites");
- ComboBox_SetCurSel(hWC,iFilterType);
-
- //----------------------------------------------------// hires texture mode
-
- hWC=GetDlgItem(hW,IDC_HIRESTEX);
- ComboBox_AddString(hWC,"0: None (standard)");
- ComboBox_AddString(hWC,"1: 2xSaI (much vram needed)");
- ComboBox_AddString(hWC,"2: Stretched (filtering needed)");
- ComboBox_SetCurSel(hWC,iHiResTextures);
-
- //----------------------------------------------------// offscreen drawing
-
- hWC=GetDlgItem(hW,IDC_OFFSCREEN);
- ComboBox_AddString(hWC,"0: None - Fastest, most glitches");
- ComboBox_AddString(hWC,"1: Minimum - Missing screens");
- ComboBox_AddString(hWC,"2: Standard - OK for most games");
- ComboBox_AddString(hWC,"3: Enhanced - Shows more stuff");
- ComboBox_AddString(hWC,"4: Extended - Can cause garbage");
- ComboBox_SetCurSel(hWC,iOffscreenDrawing);
-
- //----------------------------------------------------// texture quality
-
- hWC=GetDlgItem(hW,IDC_FRAMETEX);
- ComboBox_AddString(hWC,"0: Emulated vram - effects need FVP");
- ComboBox_AddString(hWC,"1: Black - Fast but no special effects");
- ComboBox_AddString(hWC,"2: Gfx card buffer - Can be slow");
- ComboBox_AddString(hWC,"3: Gfx card buffer & software - slow");
- ComboBox_SetCurSel(hWC,iFrameTexType);
-
- //----------------------------------------------------// framebuffer read mode
-
- hWC=GetDlgItem(hW,IDC_FRAMEREAD);
- ComboBox_AddString(hWC,"0: Emulated vram - OK for most games");
- ComboBox_AddString(hWC,"1: Gfx card buffer reads");
- ComboBox_AddString(hWC,"2: Gfx card buffer moves");
- ComboBox_AddString(hWC,"3: Gfx card buffer reads & moves");
- ComboBox_AddString(hWC,"4: Full software drawing (FVP)");
- ComboBox_SetCurSel(hWC,iFrameReadType);
-
- //----------------------------------------------------// framerate stuff
-
- if(iFrameLimit==2)
- CheckDlgButton(hW,IDC_FRAMEAUTO,TRUE);
- else CheckDlgButton(hW,IDC_FRAMEMANUELL,TRUE);
-
- sprintf(cs,"%.2f",fFrameRate);
- SetDlgItemText(hW,IDC_FRAMELIMIT,cs);
- SetDlgItemInt(hW,IDC_SCANBLEND,iScanBlend,TRUE);
-
- return TRUE;
-}
-
-////////////////////////////////////////////////////////////////////////
-// on ok: take vals
-////////////////////////////////////////////////////////////////////////
-
-void GetSettings(HWND hW)
-{
- HWND hWC;char cs[256];int i,j;char * p;
-
- hWC=GetDlgItem(hW,IDC_VRAMSIZE); // get vram size
- ComboBox_GetText(hWC,cs,255);
- iVRamSize=atoi(cs);
- if(iVRamSize<0) iVRamSize=0;
- if(iVRamSize>1024) iVRamSize=1024;
-
- hWC=GetDlgItem(hW,IDC_RESOLUTION); // get resolution
- i=ComboBox_GetCurSel(hWC);
- ComboBox_GetLBText(hWC,i,cs);
- iResX=atol(cs);
- p=strchr(cs,'x');
- if(p) iResY=atol(p+1);
- else iResY=480;
-
- hWC=GetDlgItem(hW,IDC_COLORDEPTH); // get color depth
- i=ComboBox_GetCurSel(hWC);
- ComboBox_GetLBText(hWC,i,cs);
- iColDepth=atol(cs);
-
- hWC=GetDlgItem(hW,IDC_VSYNC); // get vsync
- iForceVSync=ComboBox_GetCurSel(hWC)-1;
-
- i=GetDlgItemInt(hW,IDC_WINX,NULL,FALSE); // get win size
- if(i<100) i=100; if(i>16384) i=16384;
- j=GetDlgItemInt(hW,IDC_WINY,NULL,FALSE);
- if(j<100) j=100; if(j>16384) j=16384;
- iWinSize=MAKELONG(i,j);
-
- hWC=GetDlgItem(hW,IDC_TEXQUALITY); // texture quality
- iTexQuality=ComboBox_GetCurSel(hWC);
-
- hWC=GetDlgItem(hW,IDC_FILTERTYPE); // all kind of options
- iFilterType=ComboBox_GetCurSel(hWC);
-
- if(IsDlgButtonChecked(hW,IDC_DRAWDITHER))
- bDrawDither=TRUE; else bDrawDither=FALSE;
-
- if(IsDlgButtonChecked(hW,IDC_USELINES))
- bUseLines=TRUE; else bUseLines=FALSE;
-
- if(IsDlgButtonChecked(hW,IDC_DISPMODE2))
- bWindowMode=TRUE; else bWindowMode=FALSE;
-
- if(IsDlgButtonChecked(hW,IDC_ADVBLEND))
- bAdvancedBlend=TRUE; else bAdvancedBlend=FALSE;
-
- iOffscreenDrawing=ComboBox_GetCurSel(GetDlgItem(hW,IDC_OFFSCREEN));
-
- iFrameTexType=ComboBox_GetCurSel(GetDlgItem(hW,IDC_FRAMETEX));
- iFrameReadType=ComboBox_GetCurSel(GetDlgItem(hW,IDC_FRAMEREAD));
-
- if(IsDlgButtonChecked(hW,IDC_USELIMIT))
- bUseFrameLimit=TRUE; else bUseFrameLimit=FALSE;
-
- if(IsDlgButtonChecked(hW,IDC_USESKIP))
- bUseFrameSkip=TRUE; else bUseFrameSkip=FALSE;
-
- if(IsDlgButtonChecked(hW,IDC_OPAQUE))
- bOpaquePass=TRUE; else bOpaquePass=FALSE;
-
-// if(IsDlgButtonChecked(hW,IDC_USEANTIALIAS))
-// bUseAntiAlias=TRUE; else bUseAntiAlias=FALSE;
-
- if(IsDlgButtonChecked(hW,IDC_FASTMDEC))
- bUseFastMdec=TRUE; else bUseFastMdec=FALSE;
-
- if(IsDlgButtonChecked(hW,IDC_FASTMDEC2))
- bUse15bitMdec=TRUE; else bUse15bitMdec=FALSE;
-
- if(IsDlgButtonChecked(hW,IDC_GAMEFIX))
- bUseFixes=TRUE; else bUseFixes=FALSE;
-
- if(IsDlgButtonChecked(hW,IDC_GTEACCURACY))
- bGteAccuracy=TRUE; else bGteAccuracy=FALSE;
-
- if(IsDlgButtonChecked(hW,IDC_USESCANLINES))
- iUseScanLines=1; else iUseScanLines=0;
-
- if(IsDlgButtonChecked(hW,IDC_SHOWFPS))
- iShowFPS=1; else iShowFPS=0;
-
- if(IsDlgButtonChecked(hW,IDC_ARATIO))
- bKeepRatio=TRUE; else bKeepRatio=FALSE;
-
- if(IsDlgButtonChecked(hW,IDC_BLUR))
- iBlurBuffer=1; else iBlurBuffer=0;
-
- if(IsDlgButtonChecked(hW,IDC_SSAVE))
- iNoScreenSaver=1; else iNoScreenSaver=0;
-
- hWC=GetDlgItem(hW,IDC_HIRESTEX);
- iHiResTextures=ComboBox_GetCurSel(hWC);
-
- if(IsDlgButtonChecked(hW,IDC_USEMASK))
- {iUseMask=1;iZBufferDepth=16;}
- else {iUseMask=0;iZBufferDepth=0; }
-
- iScanBlend=GetDlgItemInt(hW,IDC_SCANBLEND,NULL,TRUE);
- if(iScanBlend>255) iScanBlend=0;
- if(iScanBlend<-1) iScanBlend=-1;
-
- if(IsDlgButtonChecked(hW,IDC_FRAMEAUTO)) // frame rate settings
- iFrameLimit=2;
- else iFrameLimit=1;
-
- GetDlgItemText(hW,IDC_FRAMELIMIT,cs,255);
- fFrameRate=(float)atof(cs);
- if(fFrameRate<10.0f) fFrameRate=10.0f;
- if(fFrameRate>1000.0f) fFrameRate=1000.0f;
-}
-
-////////////////////////////////////////////////////////////////////////
-// OK button
-////////////////////////////////////////////////////////////////////////
-
-void OnCfgOK(HWND hW)
-{
- GetSettings(hW); // get dialog settings
-
- WriteConfig(); // write registry
-
- EndDialog(hW,TRUE); // close dialog
-}
-
-////////////////////////////////////////////////////////////////////////
-// Clipboard button
-////////////////////////////////////////////////////////////////////////
-
-void OnClipboard(HWND hW)
-{
- HWND hWE=GetDlgItem(hW,IDC_CLPEDIT);
- char * pB;
-
- GetSettings(hW); // get dialog setings
- pB=GetConfigInfos(hWE); // get text infos
-
- if(pB) // some text got?
- {
- SetDlgItemText(hW,IDC_CLPEDIT,pB); // -> set text in invisible edit
- SendMessage(hWE,EM_SETSEL,0,-1); // -> sel all in edit
- SendMessage(hWE,WM_COPY,0,0); // -> copy sel to clipboard
- free(pB); // -> free helper text buffer
-
- MessageBox(hW,"Configuration info successfully copied to the clipboard\nJust use the PASTE function in another program to retrieve the data!","Copy Info",MB_ICONINFORMATION|MB_OK);
- }
-}
-
-////////////////////////////////////////////////////////////////////////
-// Cancel button (just closes window)
-////////////////////////////////////////////////////////////////////////
-
-void OnCfgCancel(HWND hW)
-{
- EndDialog(hW,FALSE);
-}
-
-////////////////////////////////////////////////////////////////////////
-// Bug fixes
-////////////////////////////////////////////////////////////////////////
-
-BOOL CALLBACK BugFixesDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- switch(uMsg)
- {
- case WM_INITDIALOG: // init dialog:
- {
- int i;
-
- for(i=0;i<32;i++) // -> loop all 32 checkboxes
- {
- if(dwCfgFixes&(1<<i)) // --> if fix is active: check box
- CheckDlgButton(hW,IDC_FIX1+i,TRUE);
- }
- }
-
- case WM_COMMAND:
- {
- switch(LOWORD(wParam))
- {
- case IDCANCEL: EndDialog(hW,FALSE);return TRUE; // cancel: close window
-
- case IDOK: // ok: take settings and close
- {
- int i;
- dwCfgFixes=0;
- for(i=0;i<32;i++)
- {
- if(IsDlgButtonChecked(hW,IDC_FIX1+i))
- dwCfgFixes|=(1<<i);
- }
- EndDialog(hW,TRUE);
- return TRUE;
- }
- }
- }
- }
- return FALSE;
-}
-
-void OnBugFixes(HWND hW) // bug fix button:
-{
- DialogBox(hInst,MAKEINTRESOURCE(IDD_FIXES), // show fix window
- hW,(DLGPROC)BugFixesDlgProc);
-}
-
-////////////////////////////////////////////////////////////////////////
-// default 1: fast
-////////////////////////////////////////////////////////////////////////
-
-void OnCfgDef1(HWND hW)
-{
- HWND hWC;
-
- hWC=GetDlgItem(hW,IDC_RESOLUTION);
- ComboBox_SetCurSel(hWC,0);
- hWC=GetDlgItem(hW,IDC_COLORDEPTH);
- ComboBox_SetCurSel(hWC,0);
- hWC=GetDlgItem(hW,IDC_VSYNC);
- ComboBox_SetCurSel(hWC,1);
- hWC=GetDlgItem(hW,IDC_TEXQUALITY);
- ComboBox_SetCurSel(hWC,0);
- hWC=GetDlgItem(hW,IDC_FILTERTYPE);
- ComboBox_SetCurSel(hWC,0);
- hWC=GetDlgItem(hW,IDC_OFFSCREEN);
- ComboBox_SetCurSel(hWC,1);
- hWC=GetDlgItem(hW,IDC_VRAMSIZE);
- ComboBox_SetCurSel(hWC,0);
-
- CheckDlgButton(hW,IDC_TEXLINEAR,FALSE);
- CheckDlgButton(hW,IDC_DRAWDITHER,FALSE);
- CheckDlgButton(hW,IDC_USELINES,FALSE);
- CheckDlgButton(hW,IDC_USELIMIT,FALSE);
- CheckDlgButton(hW,IDC_USESKIP,FALSE);
- CheckDlgButton(hW,IDC_ADVBLEND,FALSE);
- CheckDlgButton(hW,IDC_OPAQUE,TRUE);
-// CheckDlgButton(hW,IDC_USEANTIALIAS,FALSE);
- CheckDlgButton(hW,IDC_DISPMODE2,FALSE);
- CheckDlgButton(hW,IDC_DISPMODE1,TRUE);
- CheckDlgButton(hW,IDC_FRAMEAUTO,TRUE);
- CheckDlgButton(hW,IDC_FRAMEMANUELL,FALSE);
- CheckDlgButton(hW,IDC_SHOWFPS,FALSE);
-
- ComboBox_SetCurSel(GetDlgItem(hW,IDC_SUBCACHE),2);
- ComboBox_SetCurSel(GetDlgItem(hW,IDC_FRAMETEX),1);
- ComboBox_SetCurSel(GetDlgItem(hW,IDC_FRAMEREAD),0);
-
- CheckDlgButton(hW,IDC_USEMASK,FALSE);
- CheckDlgButton(hW,IDC_FASTMDEC,TRUE);
- CheckDlgButton(hW,IDC_FASTMDEC2,TRUE);
- CheckDlgButton(hW,IDC_USESCANLINES,FALSE);
-
- SetDlgItemInt(hW,IDC_FRAMELIMIT,200,FALSE);
- SetDlgItemInt(hW,IDC_WINX,640,FALSE);
- SetDlgItemInt(hW,IDC_WINY,480,FALSE);
-
- CheckDlgButton(hW,IDC_ARATIO,FALSE);
- CheckDlgButton(hW,IDC_BLUR,FALSE);
-
- SetDlgItemInt(hW,IDC_SCANBLEND,0,TRUE);
- ComboBox_SetCurSel(GetDlgItem(hW,IDC_HIRESTEX),0);
- CheckDlgButton(hW,IDC_SSAVE,FALSE);
-}
-
-////////////////////////////////////////////////////////////////////////
-// default 2: nice
-////////////////////////////////////////////////////////////////////////
-
-void OnCfgDef2(HWND hW)
-{
- HWND hWC;
-
- hWC=GetDlgItem(hW,IDC_RESOLUTION);
- ComboBox_SetCurSel(hWC,1);
- hWC=GetDlgItem(hW,IDC_COLORDEPTH);
- ComboBox_SetCurSel(hWC,1);
- hWC=GetDlgItem(hW,IDC_VSYNC);
- ComboBox_SetCurSel(hWC,2);
- hWC=GetDlgItem(hW,IDC_TEXQUALITY);
- ComboBox_SetCurSel(hWC,3);
- hWC=GetDlgItem(hW,IDC_FILTERTYPE);
- ComboBox_SetCurSel(hWC,0);
- hWC=GetDlgItem(hW,IDC_OFFSCREEN);
- ComboBox_SetCurSel(hWC,3);
- hWC=GetDlgItem(hW,IDC_VRAMSIZE);
- ComboBox_SetCurSel(hWC,0);
-
- CheckDlgButton(hW,IDC_TEXLINEAR,FALSE);
- CheckDlgButton(hW,IDC_DRAWDITHER,FALSE);
- CheckDlgButton(hW,IDC_USELINES,FALSE);
- CheckDlgButton(hW,IDC_USELIMIT,TRUE);
- CheckDlgButton(hW,IDC_USESKIP,FALSE);
- CheckDlgButton(hW,IDC_ADVBLEND,TRUE);
- CheckDlgButton(hW,IDC_OPAQUE,TRUE);
-// CheckDlgButton(hW,IDC_USEANTIALIAS,FALSE);
- CheckDlgButton(hW,IDC_DISPMODE2,FALSE);
- CheckDlgButton(hW,IDC_DISPMODE1,TRUE);
- CheckDlgButton(hW,IDC_FRAMEAUTO,TRUE);
- CheckDlgButton(hW,IDC_FRAMEMANUELL,FALSE);
- CheckDlgButton(hW,IDC_SHOWFPS,FALSE);
-
- ComboBox_SetCurSel(GetDlgItem(hW,IDC_SUBCACHE),2);
- ComboBox_SetCurSel(GetDlgItem(hW,IDC_FRAMETEX),2);
- ComboBox_SetCurSel(GetDlgItem(hW,IDC_FRAMEREAD),0);
-
- CheckDlgButton(hW,IDC_USEMASK,TRUE);
- CheckDlgButton(hW,IDC_FASTMDEC,FALSE);
- CheckDlgButton(hW,IDC_FASTMDEC2,FALSE);
- CheckDlgButton(hW,IDC_USESCANLINES,FALSE);
-
- SetDlgItemInt(hW,IDC_FRAMELIMIT,200,FALSE);
- SetDlgItemInt(hW,IDC_WINX,640,FALSE);
- SetDlgItemInt(hW,IDC_WINY,480,FALSE);
- CheckDlgButton(hW,IDC_ARATIO,FALSE);
- CheckDlgButton(hW,IDC_BLUR,FALSE);
- SetDlgItemInt(hW,IDC_SCANBLEND,0,TRUE);
- ComboBox_SetCurSel(GetDlgItem(hW,IDC_HIRESTEX),0);
- CheckDlgButton(hW,IDC_SSAVE,FALSE);
-}
-
-////////////////////////////////////////////////////////////////////////
-// read registry
-////////////////////////////////////////////////////////////////////////
-
-void ReadConfig(void) // read all config vals
-{
- HKEY myKey;
- DWORD temp;
- DWORD type;
- DWORD size;
-
- // pre-init all relevant globals
-
- iResX=800;iResY=600;
- iColDepth=32;
- bChangeRes=FALSE;
- bWindowMode=FALSE;
- bFullVRam=FALSE;
- iFilterType=0;
- bAdvancedBlend=FALSE;
- bDrawDither=FALSE;
- bUseLines=FALSE;
- bUseFrameLimit=TRUE;
- bUseFrameSkip=FALSE;
- iFrameLimit=2;
- fFrameRate=200.0f;
- iOffscreenDrawing=1;
- bOpaquePass=TRUE;
- bUseAntiAlias=FALSE;
- iTexQuality=0;
- iWinSize=MAKELONG(400,300);
- iUseMask=0;
- iZBufferDepth=0;
- bUseFastMdec=FALSE;
- bUse15bitMdec=FALSE;
- dwCfgFixes=0;
- bUseFixes=FALSE;
- bGteAccuracy=FALSE;
- iUseScanLines=0;
- iFrameTexType=0;
- iFrameReadType=0;
- iShowFPS=0;
- bKeepRatio=FALSE;
- iScanBlend=0;
- iVRamSize=0;
- iTexGarbageCollection=1;
- iBlurBuffer=0;
- iHiResTextures=0;
- iNoScreenSaver=1;
- iForceVSync=-1;
-
- lstrcpy(szGPUKeys,szKeyDefaults);
-
- // registry key: still "psemu pro/pete tnt" for compatibility reasons
-
- if (RegOpenKeyEx(HKEY_CURRENT_USER,"Software\\Vision Thing\\PSEmu Pro\\GPU\\PeteTNT",0,KEY_ALL_ACCESS,&myKey)==ERROR_SUCCESS)
- {
- size = 4;
- if(RegQueryValueEx(myKey,"ResX",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- iResX=(int)temp;
- size = 4;
- if(RegQueryValueEx(myKey,"ResY",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- iResY=(int)temp;
- size = 4;
- if(RegQueryValueEx(myKey,"WinSize",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- iWinSize=(int)temp;
- size = 4;
- if(RegQueryValueEx(myKey,"FilterType",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- iFilterType=(int)temp;
- size = 4;
- if(RegQueryValueEx(myKey,"DrawDither",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- bDrawDither=(BOOL)temp;
- size = 4;
- if(RegQueryValueEx(myKey,"UseLines",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- bUseLines=(BOOL)temp;
- size = 4;
- if(RegQueryValueEx(myKey,"WindowMode",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- bWindowMode=(BOOL)temp;
- size = 4;
- if(RegQueryValueEx(myKey,"ColDepth",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- iColDepth=(int)temp;
- size = 4;
- if(RegQueryValueEx(myKey,"ForceVSync",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- iForceVSync=(int)temp;
- size = 4;
- if(RegQueryValueEx(myKey,"UseFrameLimit",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- bUseFrameLimit=(BOOL)temp;
- size = 4;
- if(RegQueryValueEx(myKey,"UseFrameSkip",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- bUseFrameSkip=(BOOL)temp;
- size = 4;
- if(RegQueryValueEx(myKey,"FrameLimit",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- iFrameLimit=(int)temp;
- if(!iFrameLimit) {bUseFrameLimit=TRUE;bUseFrameSkip=FALSE;iFrameLimit=2;}
-
- // try to get the float framerate... if none: take int framerate
- fFrameRate=0.0f;
- size = 4;
- if(RegQueryValueEx(myKey,"FrameRateFloat",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- fFrameRate=*((float *)(&temp));
- if(fFrameRate==0.0f)
- {
- fFrameRate=200.0f;
- size = 4;
- if(RegQueryValueEx(myKey,"FrameRate",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- fFrameRate=(float)temp;
- }
-
- size = 4;
- if(RegQueryValueEx(myKey,"UseMultiPass",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- bAdvancedBlend=(int)temp;
- size = 4;
- iOffscreenDrawing=-1;
- if(RegQueryValueEx(myKey,"OffscreenDrawingEx",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- iOffscreenDrawing=temp;
- if(iOffscreenDrawing==-1 &&
- RegQueryValueEx(myKey,"OffscreenDrawing",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- iOffscreenDrawing=temp*2;
- size = 4;
- if(RegQueryValueEx(myKey,"OpaquePass",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- bOpaquePass=(BOOL)temp;
- size = 4;
- if(RegQueryValueEx(myKey,"VRamSize",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- iVRamSize=(int)temp;
-// size = 4;
-// if(RegQueryValueEx(myKey,"UseAntiAlias",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
-// bUseAntiAlias=(BOOL)temp;
- size = 4;
- if(RegQueryValueEx(myKey,"TexQuality",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- iTexQuality=(int)temp;
- size = 4;
- if(RegQueryValueEx(myKey,"CfgFixes",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- dwCfgFixes=(int)temp;
- size = 4;
- if(RegQueryValueEx(myKey,"UseFixes",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- bUseFixes=(BOOL)temp;
- size = 4;
- if(RegQueryValueEx(myKey,"GteAccuracy",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- bGteAccuracy=(BOOL)temp;
- size = 4;
- if(RegQueryValueEx(myKey,"UseMask",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- iUseMask=(int)temp;
- size = 4;
- if(RegQueryValueEx(myKey,"FastMdec",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- bUseFastMdec=(BOOL)temp;
- size = 4;
- if(RegQueryValueEx(myKey,"15BitMdec",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- bUse15bitMdec=(BOOL)temp;
- size = 4;
- if(RegQueryValueEx(myKey,"UseScanLines",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- iUseScanLines=(int)temp;
- size = 4;
- if(RegQueryValueEx(myKey,"ShowFPS",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- iShowFPS=(int)temp;
- size = 4;
- if(RegQueryValueEx(myKey,"KeepRatio",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- bKeepRatio=(BOOL)temp;
- size = 4;
- if(RegQueryValueEx(myKey,"ScanBlend",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- iScanBlend=(int)temp;
- size = 4;
- if(RegQueryValueEx(myKey,"FrameTexType",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- iFrameTexType=(int)temp;
- size = 4;
- if(RegQueryValueEx(myKey,"FrameReadType",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- iFrameReadType=(int)temp;
- size = 4;
- if(RegQueryValueEx(myKey,"FullscreenBlur",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- iBlurBuffer=(int)temp;
- size = 4;
- if(RegQueryValueEx(myKey,"HiResTextures",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- iHiResTextures=(int)temp;
- size = 4;
- if(RegQueryValueEx(myKey,"NoScreenSaver",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- iNoScreenSaver=(int)temp;
-
- size=7;
- RegQueryValueEx(myKey,"GPUKeys",0,&type,(LPBYTE)&szGPUKeys,&size);
-
- RegCloseKey(myKey);
- }
- if(!iColDepth) iColDepth=32; // adjust color info
- if(iUseMask) iZBufferDepth=16; // set zbuffer depth
- else iZBufferDepth=0;
- if(bUseFixes) dwActFixes=dwCfgFixes; // init game fix global
- if(iFrameReadType==4) bFullVRam=TRUE; // set fullvram render flag (soft gpu)
-}
-
-////////////////////////////////////////////////////////////////////////
-// read registry: window size (called on fullscreen/window resize)
-////////////////////////////////////////////////////////////////////////
-
-void ReadWinSizeConfig(void)
-{
- HKEY myKey;
- DWORD temp;
- DWORD type;
- DWORD size;
-
- iResX=800;iResY=600;
- iWinSize=MAKELONG(400,300);
- iBlurBuffer=0;
-
- // registry key: still "psemu pro/pete tnt" for compatibility reasons
-
- if (RegOpenKeyEx(HKEY_CURRENT_USER,"Software\\Vision Thing\\PSEmu Pro\\GPU\\PeteTNT",0,KEY_ALL_ACCESS,&myKey)==ERROR_SUCCESS)
- {
- size = 4;
- if(RegQueryValueEx(myKey,"ResX",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- iResX=(int)temp;
- size = 4;
- if(RegQueryValueEx(myKey,"ResY",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- iResY=(int)temp;
- size = 4;
- if(RegQueryValueEx(myKey,"WinSize",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- iWinSize=(int)temp;
- size = 4;
- if(RegQueryValueEx(myKey,"FullscreenBlur",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
- iBlurBuffer=(int)temp;
- RegCloseKey(myKey);
- }
-}
-
-////////////////////////////////////////////////////////////////////////
-// write registry
-////////////////////////////////////////////////////////////////////////
-
-void WriteConfig(void)
-{
- HKEY myKey;
- DWORD myDisp;
- DWORD temp;
-
- // registry key: still "psemu pro/pete tnt" for compatibility reasons
-
- RegCreateKeyEx(HKEY_CURRENT_USER,"Software\\Vision Thing\\PSEmu Pro\\GPU\\PeteTNT",0,NULL,REG_OPTION_NON_VOLATILE,KEY_ALL_ACCESS,NULL,&myKey,&myDisp);
- temp=iResX;
- RegSetValueEx(myKey,"ResX",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=iResY;
- RegSetValueEx(myKey,"ResY",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=iWinSize;
- RegSetValueEx(myKey,"WinSize",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=iFilterType;
- RegSetValueEx(myKey,"FilterType",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=bDrawDither;
- RegSetValueEx(myKey,"DrawDither",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=bUseLines;
- RegSetValueEx(myKey,"UseLines",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=bWindowMode;
- RegSetValueEx(myKey,"WindowMode",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=iColDepth;
- RegSetValueEx(myKey,"ColDepth",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=iForceVSync;
- RegSetValueEx(myKey,"ForceVSync",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=bUseFrameLimit;
- RegSetValueEx(myKey,"UseFrameLimit",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=bUseFrameSkip;
- RegSetValueEx(myKey,"UseFrameSkip",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=iFrameLimit;
- RegSetValueEx(myKey,"FrameLimit",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=(DWORD)fFrameRate;
- RegSetValueEx(myKey,"FrameRate",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=*((DWORD *)&fFrameRate);
- RegSetValueEx(myKey,"FrameRateFloat",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=bAdvancedBlend;
- RegSetValueEx(myKey,"UseMultiPass",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=iOffscreenDrawing/2;
- RegSetValueEx(myKey,"OffscreenDrawing",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=iOffscreenDrawing;
- RegSetValueEx(myKey,"OffscreenDrawingEx",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=bOpaquePass;
- RegSetValueEx(myKey,"OpaquePass",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=iVRamSize;
- RegSetValueEx(myKey,"VRamSize",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
-// temp=bUseAntiAlias;
-// RegSetValueEx(myKey,"UseAntiAlias",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=iTexQuality;
- RegSetValueEx(myKey,"TexQuality",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=dwCfgFixes;
- RegSetValueEx(myKey,"CfgFixes",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=bUseFixes;
- RegSetValueEx(myKey,"UseFixes",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=bGteAccuracy;
- RegSetValueEx(myKey,"GteAccuracy",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=iUseMask;
- RegSetValueEx(myKey,"UseMask",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=bUseFastMdec;
- RegSetValueEx(myKey,"FastMdec",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=bUse15bitMdec;
- RegSetValueEx(myKey,"15BitMdec",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=iUseScanLines;
- RegSetValueEx(myKey,"UseScanLines",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=iShowFPS;
- RegSetValueEx(myKey,"ShowFPS",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=iFrameTexType;
- RegSetValueEx(myKey,"FrameTexType",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=iFrameReadType;
- RegSetValueEx(myKey,"FrameReadType",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=bKeepRatio;
- RegSetValueEx(myKey,"KeepRatio",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=iBlurBuffer;
- RegSetValueEx(myKey,"FullscreenBlur",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=iHiResTextures;
- RegSetValueEx(myKey,"HiResTextures",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=iNoScreenSaver;
- RegSetValueEx(myKey,"NoScreenSaver",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- temp=iScanBlend;
- RegSetValueEx(myKey,"ScanBlend",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
- RegSetValueEx(myKey,"GPUKeys",0,REG_BINARY,(LPBYTE)szGPUKeys,7);
-
- RegCloseKey(myKey);
-}
-
-////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////
-// Key definition window
-
-typedef struct
-{
- char szName[10];
- char cCode;
-}
-KEYSETS;
-
-// sepcial keys:
-
-KEYSETS tMKeys[]=
-{
- {"SPACE", 0x20},
- {"PRIOR", 0x21},
- {"NEXT", 0x22},
- {"END", 0x23},
- {"HOME", 0x24},
- {"LEFT", 0x25},
- {"UP", 0x26},
- {"RIGHT", 0x27},
- {"DOWN", 0x28},
- {"SELECT", 0x29},
- {"PRINT", 0x2A},
- {"EXECUTE", 0x2B},
- {"SNAPSHOT", 0x2C},
- {"INSERT", 0x2D},
- {"DELETE", 0x2E},
- {"HELP", 0x2F},
- {"NUMPAD0", 0x60},
- {"NUMPAD1", 0x61},
- {"NUMPAD2", 0x62},
- {"NUMPAD3", 0x63},
- {"NUMPAD4", 0x64},
- {"NUMPAD5", 0x65},
- {"NUMPAD6", 0x66},
- {"NUMPAD7", 0x67},
- {"NUMPAD8", 0x68},
- {"NUMPAD9", 0x69},
- {"MULTIPLY", 0x6A},
- {"ADD", 0x6B},
- {"SEPARATOR", 0x6C},
- {"SUBTRACT", 0x6D},
- {"DECIMAL", 0x6E},
- {"DIVIDE", 0x6F},
- {"", 0x00}
-};
-
-// select key entry in combo box
-
-void SetGPUKey(HWND hWC,char szKey)
-{
- int i,iCnt=ComboBox_GetCount(hWC);
- for(i=0;i<iCnt;i++)
- {
- if(ComboBox_GetItemData(hWC,i)==szKey) break;
- }
- if(i!=iCnt) ComboBox_SetCurSel(hWC,i);
-}
-
-// key window proc
-
-BOOL CALLBACK KeyDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- switch(uMsg)
- {
- case WM_INITDIALOG: // init dialog
- {
- int i,j,k;char szB[2];HWND hWC;
- for(i=IDC_KEY1;i<=IDC_KEY6;i++)
- {
- hWC=GetDlgItem(hW,i);
-
- for(j=0;tMKeys[j].cCode!=0;j++) // fill special keys in combo
- {
- k=ComboBox_AddString(hWC,tMKeys[j].szName);
- ComboBox_SetItemData(hWC,k,tMKeys[j].cCode);
- }
- for(j=0x30;j<=0x39;j++) // fill numbers in combo
- {
- wsprintf(szB,"%c",j);
- k=ComboBox_AddString(hWC,szB);
- ComboBox_SetItemData(hWC,k,j);
- }
- for(j=0x41;j<=0x5a;j++) // fill alphas in combo
- {
- wsprintf(szB,"%c",j);
- k=ComboBox_AddString(hWC,szB);
- ComboBox_SetItemData(hWC,k,j);
- }
- SetGPUKey(GetDlgItem(hW,i),szGPUKeys[i-IDC_KEY1]);
- }
- }return TRUE;
-
- case WM_COMMAND:
- {
- switch(LOWORD(wParam))
- {
- case IDC_DEFAULT: // default button:
- {
- int i; // -> set defaults
- for(i=IDC_KEY1;i<=IDC_KEY6;i++)
- SetGPUKey(GetDlgItem(hW,i),szKeyDefaults[i-IDC_KEY1]);
- }break;
-
- case IDCANCEL: // cancel: just close window
- EndDialog(hW,FALSE); return TRUE;
-
- case IDOK: // ok: take key bindings
- {
- HWND hWC;int i;
- for(i=IDC_KEY1;i<=IDC_KEY6;i++)
- {
- hWC=GetDlgItem(hW,i);
- szGPUKeys[i-IDC_KEY1]=ComboBox_GetItemData(hWC,ComboBox_GetCurSel(hWC));
- if(szGPUKeys[i-IDC_KEY1]<0x20) szGPUKeys[i-IDC_KEY1]=0x20;
- }
- EndDialog(hW,TRUE);
- return TRUE;
- }
- }
- }
- }
- return FALSE;
-}
-
-void OnKeyConfig(HWND hW) // call key dialog
-{
- DialogBox(hInst,MAKEINTRESOURCE(IDD_KEYS),
- hW,(DLGPROC)KeyDlgProc);
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// AboutDlg dialog (Windows)
-
-BOOL CALLBACK AboutDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- switch(uMsg)
- {
- case WM_COMMAND:
- {
- switch(LOWORD(wParam))
- {
- case IDOK: EndDialog(hW,TRUE);return TRUE;
- }
- }
- }
- return FALSE;
-}
+/***************************************************************************
+ cfg.c - description
+ -------------------
+ begin : Sun Mar 08 2009
+ copyright : (C) 1999-2009 by Pete Bernert
+ web : www.pbernert.com
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. See also the license.txt file for *
+ * additional informations. *
+ * *
+ ***************************************************************************/
+
+#define _IN_CFG
+
+/////////////////////////////////////////////////////////////////////////////
+// Windows config handling
+
+#include "stdafx.h"
+#include "resource.h"
+#include "externals.h"
+#include "cfg.h"
+#include <stdio.h>
+
+char szKeyDefaults[7]={VK_DELETE,VK_INSERT,VK_HOME,VK_END,VK_PRIOR,VK_NEXT,0x00};
+
+/////////////////////////////////////////////////////////////////////////////
+// CCfgDlg dialog
+
+BOOL OnInitCfgDialog(HWND hW);
+void OnCfgOK(HWND hW);
+void OnCfgCancel(HWND hW);
+void OnCfgDef1(HWND hW);
+void OnCfgDef2(HWND hW);
+void OnBugFixes(HWND hW);
+void OnKeyConfig(HWND hW);
+void GetSettings(HWND hW);
+void OnClipboard(HWND hW);
+char * GetConfigInfos(HWND hWE);
+
+BOOL CALLBACK CfgDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ switch(uMsg)
+ {
+ case WM_INITDIALOG:
+ return OnInitCfgDialog(hW);
+
+ case WM_COMMAND:
+ {
+ switch(LOWORD(wParam))
+ {
+ case IDC_DEF1: OnCfgDef1(hW); return TRUE;
+ case IDC_DEF2: OnCfgDef2(hW); return TRUE;
+ case IDC_SELFIX: OnBugFixes(hW); return TRUE;
+ case IDC_KEYCONFIG: OnKeyConfig(hW); return TRUE;
+ case IDCANCEL: OnCfgCancel(hW); return TRUE;
+ case IDOK: OnCfgOK(hW); return TRUE;
+ case IDC_CLIPBOARD: OnClipboard(hW); return TRUE;
+ }
+ }
+ }
+ return FALSE;
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// CCfgDlg message handlers
+
+////////////////////////////////////////////////////////////////////////
+// init dlg
+////////////////////////////////////////////////////////////////////////
+
+void ComboBoxAddRes(HWND hWC,char * cs) // ADD COMBOBOX RESOURCES
+{
+ int i=ComboBox_FindString(hWC,-1,cs);
+ if(i!=CB_ERR) return;
+ ComboBox_AddString(hWC,cs);
+}
+
+
+BOOL OnInitCfgDialog(HWND hW) // INIT CONFIG DIALOG
+{
+ HWND hWC;char cs[256];int i;DEVMODE dv;
+
+ ReadConfig(); // read registry stuff
+
+ //----------------------------------------------------// fill combo with available resolutions
+
+ hWC=GetDlgItem(hW,IDC_RESOLUTION);
+
+ memset(&dv,0,sizeof(DEVMODE));
+ dv.dmSize=sizeof(DEVMODE);
+ i=0;
+
+ while(EnumDisplaySettings(NULL,i,&dv)) // add all resolutions from the driver
+ {
+ wsprintf(cs,"%4d x %4d",dv.dmPelsWidth,dv.dmPelsHeight);
+ ComboBoxAddRes(hWC,cs);
+ i++;
+ }
+
+ ComboBoxAddRes(hWC," 640 x 480"); // and also add some common ones
+ ComboBoxAddRes(hWC," 800 x 600");
+ ComboBoxAddRes(hWC,"1024 x 768");
+ ComboBoxAddRes(hWC,"1152 x 864");
+ ComboBoxAddRes(hWC,"1280 x 1024");
+ ComboBoxAddRes(hWC,"1600 x 1200");
+
+ wsprintf(cs,"%4d x %4d",iResX,iResY); // search curr resolution in combo
+ i=ComboBox_FindString(hWC,-1,cs);
+ if(i==CB_ERR) i=0;
+ ComboBox_SetCurSel(hWC,i); // and select this one
+
+ //----------------------------------------------------// window size
+
+ SetDlgItemInt(hW,IDC_WINX,LOWORD(iWinSize),FALSE);
+ SetDlgItemInt(hW,IDC_WINY,HIWORD(iWinSize),FALSE);
+
+ //----------------------------------------------------// color depth
+
+ hWC=GetDlgItem(hW,IDC_COLORDEPTH);
+ ComboBox_AddString(hWC,"16 Bit");
+ ComboBox_AddString(hWC,"32 Bit");
+ wsprintf(cs,"%d Bit",iColDepth);
+ i=ComboBox_FindString(hWC,-1,cs);
+ if(i==CB_ERR) i=0;
+ ComboBox_SetCurSel(hWC,i);
+
+ //----------------------------------------------------// vsync
+
+ hWC=GetDlgItem(hW,IDC_VSYNC);
+ ComboBox_AddString(hWC,"Driver");
+ ComboBox_AddString(hWC,"Off");
+ ComboBox_AddString(hWC,"On");
+ ComboBox_SetCurSel(hWC,iForceVSync+1);
+
+ //----------------------------------------------------// vram size
+
+ hWC=GetDlgItem(hW,IDC_VRAMSIZE);
+ ComboBox_AddString(hWC,"0 (Autodetect)");
+ ComboBox_AddString(hWC,"2");
+ ComboBox_AddString(hWC,"4");
+ ComboBox_AddString(hWC,"8");
+ ComboBox_AddString(hWC,"16");
+ ComboBox_AddString(hWC,"32");
+ ComboBox_AddString(hWC,"64");
+ ComboBox_AddString(hWC,"128 (or more)");
+
+ if(!iVRamSize) ComboBox_SetCurSel(hWC,0);
+ else {wsprintf(cs,"%d",iVRamSize);ComboBox_SetText(hWC,cs);}
+
+ //----------------------------------------------------// texture quality
+
+ hWC=GetDlgItem(hW,IDC_TEXQUALITY);
+ ComboBox_AddString(hWC,"don't care - Use driver's default textures");
+ ComboBox_AddString(hWC,"R4 G4 B4 A4 - Fast, but less colorful");
+ ComboBox_AddString(hWC,"R5 G5 B5 A1 - Nice colors, bad transparency");
+ ComboBox_AddString(hWC,"R8 G8 B8 A8 - Best colors, more ram needed");
+ ComboBox_AddString(hWC,"B8 G8 R8 A8 - Slightly faster with some cards");
+ ComboBox_SetCurSel(hWC,iTexQuality);
+
+ //----------------------------------------------------// all kind of on/off options
+
+ if(bDrawDither) CheckDlgButton(hW,IDC_DRAWDITHER,TRUE);
+ if(bUseLines) CheckDlgButton(hW,IDC_USELINES,TRUE);
+ if(bUseFrameLimit) CheckDlgButton(hW,IDC_USELIMIT,TRUE);
+ if(bUseFrameSkip) CheckDlgButton(hW,IDC_USESKIP,TRUE);
+ if(bAdvancedBlend) CheckDlgButton(hW,IDC_ADVBLEND,TRUE);
+ if(bOpaquePass) CheckDlgButton(hW,IDC_OPAQUE,TRUE);
+// if(bUseAntiAlias) CheckDlgButton(hW,IDC_USEANTIALIAS,TRUE);
+ if(bWindowMode) CheckDlgButton(hW,IDC_DISPMODE2,TRUE);
+ else CheckDlgButton(hW,IDC_DISPMODE1,TRUE);
+ if(iUseMask) CheckDlgButton(hW,IDC_USEMASK,TRUE);
+ if(bUseFastMdec) CheckDlgButton(hW,IDC_FASTMDEC,TRUE);
+ if(bUse15bitMdec) CheckDlgButton(hW,IDC_FASTMDEC2,TRUE);
+ if(bUseFixes) CheckDlgButton(hW,IDC_GAMEFIX,TRUE);
+ if(bGteAccuracy) CheckDlgButton(hW,IDC_GTEACCURACY,TRUE);
+ if(iUseScanLines) CheckDlgButton(hW,IDC_USESCANLINES,TRUE);
+ if(iShowFPS) CheckDlgButton(hW,IDC_SHOWFPS,TRUE);
+ if(bKeepRatio) CheckDlgButton(hW,IDC_ARATIO,TRUE);
+ if(iBlurBuffer) CheckDlgButton(hW,IDC_BLUR,TRUE);
+ if(iNoScreenSaver) CheckDlgButton(hW,IDC_SSAVE,TRUE);
+
+ //----------------------------------------------------// texture filter
+
+ hWC=GetDlgItem(hW,IDC_FILTERTYPE);
+ ComboBox_AddString(hWC,"0: None");
+ ComboBox_AddString(hWC,"1: Standard - Glitches will happen");
+ ComboBox_AddString(hWC,"2: Extended - Removes black borders");
+ ComboBox_AddString(hWC,"3: Standard w/o Sprites - unfiltered 2D");
+ ComboBox_AddString(hWC,"4: Extended w/o Sprites - unfiltered 2D");
+ ComboBox_AddString(hWC,"5: Standard + smoothed Sprites");
+ ComboBox_AddString(hWC,"6: Extended + smoothed Sprites");
+ ComboBox_SetCurSel(hWC,iFilterType);
+
+ //----------------------------------------------------// hires texture mode
+
+ hWC=GetDlgItem(hW,IDC_HIRESTEX);
+ ComboBox_AddString(hWC,"0: None (standard)");
+ ComboBox_AddString(hWC,"1: 2xSaI (much vram needed)");
+ ComboBox_AddString(hWC,"2: Stretched (filtering needed)");
+ ComboBox_SetCurSel(hWC,iHiResTextures);
+
+ //----------------------------------------------------// offscreen drawing
+
+ hWC=GetDlgItem(hW,IDC_OFFSCREEN);
+ ComboBox_AddString(hWC,"0: None - Fastest, most glitches");
+ ComboBox_AddString(hWC,"1: Minimum - Missing screens");
+ ComboBox_AddString(hWC,"2: Standard - OK for most games");
+ ComboBox_AddString(hWC,"3: Enhanced - Shows more stuff");
+ ComboBox_AddString(hWC,"4: Extended - Can cause garbage");
+ ComboBox_SetCurSel(hWC,iOffscreenDrawing);
+
+ //----------------------------------------------------// texture quality
+
+ hWC=GetDlgItem(hW,IDC_FRAMETEX);
+ ComboBox_AddString(hWC,"0: Emulated vram - effects need FVP");
+ ComboBox_AddString(hWC,"1: Black - Fast but no special effects");
+ ComboBox_AddString(hWC,"2: Gfx card buffer - Can be slow");
+ ComboBox_AddString(hWC,"3: Gfx card buffer & software - slow");
+ ComboBox_SetCurSel(hWC,iFrameTexType);
+
+ //----------------------------------------------------// framebuffer read mode
+
+ hWC=GetDlgItem(hW,IDC_FRAMEREAD);
+ ComboBox_AddString(hWC,"0: Emulated vram - OK for most games");
+ ComboBox_AddString(hWC,"1: Gfx card buffer reads");
+ ComboBox_AddString(hWC,"2: Gfx card buffer moves");
+ ComboBox_AddString(hWC,"3: Gfx card buffer reads & moves");
+ ComboBox_AddString(hWC,"4: Full software drawing (FVP)");
+ ComboBox_SetCurSel(hWC,iFrameReadType);
+
+ //----------------------------------------------------// framerate stuff
+
+ if(iFrameLimit==2)
+ CheckDlgButton(hW,IDC_FRAMEAUTO,TRUE);
+ else CheckDlgButton(hW,IDC_FRAMEMANUELL,TRUE);
+
+ sprintf(cs,"%.2f",fFrameRate);
+ SetDlgItemText(hW,IDC_FRAMELIMIT,cs);
+ SetDlgItemInt(hW,IDC_SCANBLEND,iScanBlend,TRUE);
+
+ return TRUE;
+}
+
+////////////////////////////////////////////////////////////////////////
+// on ok: take vals
+////////////////////////////////////////////////////////////////////////
+
+void GetSettings(HWND hW)
+{
+ HWND hWC;char cs[256];int i,j;char * p;
+
+ hWC=GetDlgItem(hW,IDC_VRAMSIZE); // get vram size
+ ComboBox_GetText(hWC,cs,255);
+ iVRamSize=atoi(cs);
+ if(iVRamSize<0) iVRamSize=0;
+ if(iVRamSize>1024) iVRamSize=1024;
+
+ hWC=GetDlgItem(hW,IDC_RESOLUTION); // get resolution
+ i=ComboBox_GetCurSel(hWC);
+ ComboBox_GetLBText(hWC,i,cs);
+ iResX=atol(cs);
+ p=strchr(cs,'x');
+ if(p) iResY=atol(p+1);
+ else iResY=480;
+
+ hWC=GetDlgItem(hW,IDC_COLORDEPTH); // get color depth
+ i=ComboBox_GetCurSel(hWC);
+ ComboBox_GetLBText(hWC,i,cs);
+ iColDepth=atol(cs);
+
+ hWC=GetDlgItem(hW,IDC_VSYNC); // get vsync
+ iForceVSync=ComboBox_GetCurSel(hWC)-1;
+
+ i=GetDlgItemInt(hW,IDC_WINX,NULL,FALSE); // get win size
+ if(i<100) i=100; if(i>16384) i=16384;
+ j=GetDlgItemInt(hW,IDC_WINY,NULL,FALSE);
+ if(j<100) j=100; if(j>16384) j=16384;
+ iWinSize=MAKELONG(i,j);
+
+ hWC=GetDlgItem(hW,IDC_TEXQUALITY); // texture quality
+ iTexQuality=ComboBox_GetCurSel(hWC);
+
+ hWC=GetDlgItem(hW,IDC_FILTERTYPE); // all kind of options
+ iFilterType=ComboBox_GetCurSel(hWC);
+
+ if(IsDlgButtonChecked(hW,IDC_DRAWDITHER))
+ bDrawDither=TRUE; else bDrawDither=FALSE;
+
+ if(IsDlgButtonChecked(hW,IDC_USELINES))
+ bUseLines=TRUE; else bUseLines=FALSE;
+
+ if(IsDlgButtonChecked(hW,IDC_DISPMODE2))
+ bWindowMode=TRUE; else bWindowMode=FALSE;
+
+ if(IsDlgButtonChecked(hW,IDC_ADVBLEND))
+ bAdvancedBlend=TRUE; else bAdvancedBlend=FALSE;
+
+ iOffscreenDrawing=ComboBox_GetCurSel(GetDlgItem(hW,IDC_OFFSCREEN));
+
+ iFrameTexType=ComboBox_GetCurSel(GetDlgItem(hW,IDC_FRAMETEX));
+ iFrameReadType=ComboBox_GetCurSel(GetDlgItem(hW,IDC_FRAMEREAD));
+
+ if(IsDlgButtonChecked(hW,IDC_USELIMIT))
+ bUseFrameLimit=TRUE; else bUseFrameLimit=FALSE;
+
+ if(IsDlgButtonChecked(hW,IDC_USESKIP))
+ bUseFrameSkip=TRUE; else bUseFrameSkip=FALSE;
+
+ if(IsDlgButtonChecked(hW,IDC_OPAQUE))
+ bOpaquePass=TRUE; else bOpaquePass=FALSE;
+
+// if(IsDlgButtonChecked(hW,IDC_USEANTIALIAS))
+// bUseAntiAlias=TRUE; else bUseAntiAlias=FALSE;
+
+ if(IsDlgButtonChecked(hW,IDC_FASTMDEC))
+ bUseFastMdec=TRUE; else bUseFastMdec=FALSE;
+
+ if(IsDlgButtonChecked(hW,IDC_FASTMDEC2))
+ bUse15bitMdec=TRUE; else bUse15bitMdec=FALSE;
+
+ if(IsDlgButtonChecked(hW,IDC_GAMEFIX))
+ bUseFixes=TRUE; else bUseFixes=FALSE;
+
+ if(IsDlgButtonChecked(hW,IDC_GTEACCURACY))
+ bGteAccuracy=TRUE; else bGteAccuracy=FALSE;
+
+ if(IsDlgButtonChecked(hW,IDC_USESCANLINES))
+ iUseScanLines=1; else iUseScanLines=0;
+
+ if(IsDlgButtonChecked(hW,IDC_SHOWFPS))
+ iShowFPS=1; else iShowFPS=0;
+
+ if(IsDlgButtonChecked(hW,IDC_ARATIO))
+ bKeepRatio=TRUE; else bKeepRatio=FALSE;
+
+ if(IsDlgButtonChecked(hW,IDC_BLUR))
+ iBlurBuffer=1; else iBlurBuffer=0;
+
+ if(IsDlgButtonChecked(hW,IDC_SSAVE))
+ iNoScreenSaver=1; else iNoScreenSaver=0;
+
+ hWC=GetDlgItem(hW,IDC_HIRESTEX);
+ iHiResTextures=ComboBox_GetCurSel(hWC);
+
+ if(IsDlgButtonChecked(hW,IDC_USEMASK))
+ {iUseMask=1;iZBufferDepth=16;}
+ else {iUseMask=0;iZBufferDepth=0; }
+
+ iScanBlend=GetDlgItemInt(hW,IDC_SCANBLEND,NULL,TRUE);
+ if(iScanBlend>255) iScanBlend=0;
+ if(iScanBlend<-1) iScanBlend=-1;
+
+ if(IsDlgButtonChecked(hW,IDC_FRAMEAUTO)) // frame rate settings
+ iFrameLimit=2;
+ else iFrameLimit=1;
+
+ GetDlgItemText(hW,IDC_FRAMELIMIT,cs,255);
+ fFrameRate=(float)atof(cs);
+ if(fFrameRate<10.0f) fFrameRate=10.0f;
+ if(fFrameRate>1000.0f) fFrameRate=1000.0f;
+}
+
+////////////////////////////////////////////////////////////////////////
+// OK button
+////////////////////////////////////////////////////////////////////////
+
+void OnCfgOK(HWND hW)
+{
+ GetSettings(hW); // get dialog settings
+
+ WriteConfig(); // write registry
+
+ EndDialog(hW,TRUE); // close dialog
+}
+
+////////////////////////////////////////////////////////////////////////
+// Clipboard button
+////////////////////////////////////////////////////////////////////////
+
+void OnClipboard(HWND hW)
+{
+ HWND hWE=GetDlgItem(hW,IDC_CLPEDIT);
+ char * pB;
+
+ GetSettings(hW); // get dialog setings
+ pB=GetConfigInfos(hWE); // get text infos
+
+ if(pB) // some text got?
+ {
+ SetDlgItemText(hW,IDC_CLPEDIT,pB); // -> set text in invisible edit
+ SendMessage(hWE,EM_SETSEL,0,-1); // -> sel all in edit
+ SendMessage(hWE,WM_COPY,0,0); // -> copy sel to clipboard
+ free(pB); // -> free helper text buffer
+
+ MessageBox(hW,"Configuration info successfully copied to the clipboard\nJust use the PASTE function in another program to retrieve the data!","Copy Info",MB_ICONINFORMATION|MB_OK);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////
+// Cancel button (just closes window)
+////////////////////////////////////////////////////////////////////////
+
+void OnCfgCancel(HWND hW)
+{
+ EndDialog(hW,FALSE);
+}
+
+////////////////////////////////////////////////////////////////////////
+// Bug fixes
+////////////////////////////////////////////////////////////////////////
+
+BOOL CALLBACK BugFixesDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ switch(uMsg)
+ {
+ case WM_INITDIALOG: // init dialog:
+ {
+ int i;
+
+ for(i=0;i<32;i++) // -> loop all 32 checkboxes
+ {
+ if(dwCfgFixes&(1<<i)) // --> if fix is active: check box
+ CheckDlgButton(hW,IDC_FIX1+i,TRUE);
+ }
+ }
+
+ case WM_COMMAND:
+ {
+ switch(LOWORD(wParam))
+ {
+ case IDCANCEL: EndDialog(hW,FALSE);return TRUE; // cancel: close window
+
+ case IDOK: // ok: take settings and close
+ {
+ int i;
+ dwCfgFixes=0;
+ for(i=0;i<32;i++)
+ {
+ if(IsDlgButtonChecked(hW,IDC_FIX1+i))
+ dwCfgFixes|=(1<<i);
+ }
+ EndDialog(hW,TRUE);
+ return TRUE;
+ }
+ }
+ }
+ }
+ return FALSE;
+}
+
+void OnBugFixes(HWND hW) // bug fix button:
+{
+ DialogBox(hInst,MAKEINTRESOURCE(IDD_FIXES), // show fix window
+ hW,(DLGPROC)BugFixesDlgProc);
+}
+
+////////////////////////////////////////////////////////////////////////
+// default 1: fast
+////////////////////////////////////////////////////////////////////////
+
+void OnCfgDef1(HWND hW)
+{
+ HWND hWC;
+
+ hWC=GetDlgItem(hW,IDC_RESOLUTION);
+ ComboBox_SetCurSel(hWC,0);
+ hWC=GetDlgItem(hW,IDC_COLORDEPTH);
+ ComboBox_SetCurSel(hWC,0);
+ hWC=GetDlgItem(hW,IDC_VSYNC);
+ ComboBox_SetCurSel(hWC,1);
+ hWC=GetDlgItem(hW,IDC_TEXQUALITY);
+ ComboBox_SetCurSel(hWC,0);
+ hWC=GetDlgItem(hW,IDC_FILTERTYPE);
+ ComboBox_SetCurSel(hWC,0);
+ hWC=GetDlgItem(hW,IDC_OFFSCREEN);
+ ComboBox_SetCurSel(hWC,1);
+ hWC=GetDlgItem(hW,IDC_VRAMSIZE);
+ ComboBox_SetCurSel(hWC,0);
+
+ CheckDlgButton(hW,IDC_TEXLINEAR,FALSE);
+ CheckDlgButton(hW,IDC_DRAWDITHER,FALSE);
+ CheckDlgButton(hW,IDC_USELINES,FALSE);
+ CheckDlgButton(hW,IDC_USELIMIT,FALSE);
+ CheckDlgButton(hW,IDC_USESKIP,FALSE);
+ CheckDlgButton(hW,IDC_ADVBLEND,FALSE);
+ CheckDlgButton(hW,IDC_OPAQUE,TRUE);
+// CheckDlgButton(hW,IDC_USEANTIALIAS,FALSE);
+ CheckDlgButton(hW,IDC_DISPMODE2,FALSE);
+ CheckDlgButton(hW,IDC_DISPMODE1,TRUE);
+ CheckDlgButton(hW,IDC_FRAMEAUTO,TRUE);
+ CheckDlgButton(hW,IDC_FRAMEMANUELL,FALSE);
+ CheckDlgButton(hW,IDC_SHOWFPS,FALSE);
+
+ ComboBox_SetCurSel(GetDlgItem(hW,IDC_SUBCACHE),2);
+ ComboBox_SetCurSel(GetDlgItem(hW,IDC_FRAMETEX),1);
+ ComboBox_SetCurSel(GetDlgItem(hW,IDC_FRAMEREAD),0);
+
+ CheckDlgButton(hW,IDC_USEMASK,FALSE);
+ CheckDlgButton(hW,IDC_FASTMDEC,TRUE);
+ CheckDlgButton(hW,IDC_FASTMDEC2,TRUE);
+ CheckDlgButton(hW,IDC_USESCANLINES,FALSE);
+
+ SetDlgItemInt(hW,IDC_FRAMELIMIT,200,FALSE);
+ SetDlgItemInt(hW,IDC_WINX,640,FALSE);
+ SetDlgItemInt(hW,IDC_WINY,480,FALSE);
+
+ CheckDlgButton(hW,IDC_ARATIO,FALSE);
+ CheckDlgButton(hW,IDC_BLUR,FALSE);
+
+ SetDlgItemInt(hW,IDC_SCANBLEND,0,TRUE);
+ ComboBox_SetCurSel(GetDlgItem(hW,IDC_HIRESTEX),0);
+ CheckDlgButton(hW,IDC_SSAVE,FALSE);
+}
+
+////////////////////////////////////////////////////////////////////////
+// default 2: nice
+////////////////////////////////////////////////////////////////////////
+
+void OnCfgDef2(HWND hW)
+{
+ HWND hWC;
+
+ hWC=GetDlgItem(hW,IDC_RESOLUTION);
+ ComboBox_SetCurSel(hWC,1);
+ hWC=GetDlgItem(hW,IDC_COLORDEPTH);
+ ComboBox_SetCurSel(hWC,1);
+ hWC=GetDlgItem(hW,IDC_VSYNC);
+ ComboBox_SetCurSel(hWC,2);
+ hWC=GetDlgItem(hW,IDC_TEXQUALITY);
+ ComboBox_SetCurSel(hWC,3);
+ hWC=GetDlgItem(hW,IDC_FILTERTYPE);
+ ComboBox_SetCurSel(hWC,0);
+ hWC=GetDlgItem(hW,IDC_OFFSCREEN);
+ ComboBox_SetCurSel(hWC,3);
+ hWC=GetDlgItem(hW,IDC_VRAMSIZE);
+ ComboBox_SetCurSel(hWC,0);
+
+ CheckDlgButton(hW,IDC_TEXLINEAR,FALSE);
+ CheckDlgButton(hW,IDC_DRAWDITHER,FALSE);
+ CheckDlgButton(hW,IDC_USELINES,FALSE);
+ CheckDlgButton(hW,IDC_USELIMIT,TRUE);
+ CheckDlgButton(hW,IDC_USESKIP,FALSE);
+ CheckDlgButton(hW,IDC_ADVBLEND,TRUE);
+ CheckDlgButton(hW,IDC_OPAQUE,TRUE);
+// CheckDlgButton(hW,IDC_USEANTIALIAS,FALSE);
+ CheckDlgButton(hW,IDC_DISPMODE2,FALSE);
+ CheckDlgButton(hW,IDC_DISPMODE1,TRUE);
+ CheckDlgButton(hW,IDC_FRAMEAUTO,TRUE);
+ CheckDlgButton(hW,IDC_FRAMEMANUELL,FALSE);
+ CheckDlgButton(hW,IDC_SHOWFPS,FALSE);
+
+ ComboBox_SetCurSel(GetDlgItem(hW,IDC_SUBCACHE),2);
+ ComboBox_SetCurSel(GetDlgItem(hW,IDC_FRAMETEX),2);
+ ComboBox_SetCurSel(GetDlgItem(hW,IDC_FRAMEREAD),0);
+
+ CheckDlgButton(hW,IDC_USEMASK,TRUE);
+ CheckDlgButton(hW,IDC_FASTMDEC,FALSE);
+ CheckDlgButton(hW,IDC_FASTMDEC2,FALSE);
+ CheckDlgButton(hW,IDC_USESCANLINES,FALSE);
+
+ SetDlgItemInt(hW,IDC_FRAMELIMIT,200,FALSE);
+ SetDlgItemInt(hW,IDC_WINX,640,FALSE);
+ SetDlgItemInt(hW,IDC_WINY,480,FALSE);
+ CheckDlgButton(hW,IDC_ARATIO,FALSE);
+ CheckDlgButton(hW,IDC_BLUR,FALSE);
+ SetDlgItemInt(hW,IDC_SCANBLEND,0,TRUE);
+ ComboBox_SetCurSel(GetDlgItem(hW,IDC_HIRESTEX),0);
+ CheckDlgButton(hW,IDC_SSAVE,FALSE);
+}
+
+////////////////////////////////////////////////////////////////////////
+// read registry
+////////////////////////////////////////////////////////////////////////
+
+void ReadConfig(void) // read all config vals
+{
+ HKEY myKey;
+ DWORD temp;
+ DWORD type;
+ DWORD size;
+
+ // pre-init all relevant globals
+
+ iResX=800;iResY=600;
+ iColDepth=32;
+ bChangeRes=FALSE;
+ bWindowMode=FALSE;
+ bFullVRam=FALSE;
+ iFilterType=0;
+ bAdvancedBlend=FALSE;
+ bDrawDither=FALSE;
+ bUseLines=FALSE;
+ bUseFrameLimit=TRUE;
+ bUseFrameSkip=FALSE;
+ iFrameLimit=2;
+ fFrameRate=200.0f;
+ iOffscreenDrawing=1;
+ bOpaquePass=TRUE;
+ bUseAntiAlias=FALSE;
+ iTexQuality=0;
+ iWinSize=MAKELONG(400,300);
+ iUseMask=0;
+ iZBufferDepth=0;
+ bUseFastMdec=FALSE;
+ bUse15bitMdec=FALSE;
+ dwCfgFixes=0;
+ bUseFixes=FALSE;
+ bGteAccuracy=FALSE;
+ iUseScanLines=0;
+ iFrameTexType=0;
+ iFrameReadType=0;
+ iShowFPS=0;
+ bKeepRatio=FALSE;
+ iScanBlend=0;
+ iVRamSize=0;
+ iTexGarbageCollection=1;
+ iBlurBuffer=0;
+ iHiResTextures=0;
+ iNoScreenSaver=1;
+ iForceVSync=-1;
+
+ lstrcpy(szGPUKeys,szKeyDefaults);
+
+ // registry key: still "psemu pro/pete tnt" for compatibility reasons
+
+ if (RegOpenKeyEx(HKEY_CURRENT_USER,"Software\\Vision Thing\\PSEmu Pro\\GPU\\PeteTNT",0,KEY_ALL_ACCESS,&myKey)==ERROR_SUCCESS)
+ {
+ size = 4;
+ if(RegQueryValueEx(myKey,"ResX",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iResX=(int)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"ResY",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iResY=(int)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"WinSize",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iWinSize=(int)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"FilterType",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iFilterType=(int)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"DrawDither",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ bDrawDither=(BOOL)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"UseLines",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ bUseLines=(BOOL)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"WindowMode",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ bWindowMode=(BOOL)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"ColDepth",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iColDepth=(int)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"ForceVSync",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iForceVSync=(int)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"UseFrameLimit",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ bUseFrameLimit=(BOOL)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"UseFrameSkip",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ bUseFrameSkip=(BOOL)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"FrameLimit",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iFrameLimit=(int)temp;
+ if(!iFrameLimit) {bUseFrameLimit=TRUE;bUseFrameSkip=FALSE;iFrameLimit=2;}
+
+ // try to get the float framerate... if none: take int framerate
+ fFrameRate=0.0f;
+ size = 4;
+ if(RegQueryValueEx(myKey,"FrameRateFloat",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ fFrameRate=*((float *)(&temp));
+ if(fFrameRate==0.0f)
+ {
+ fFrameRate=200.0f;
+ size = 4;
+ if(RegQueryValueEx(myKey,"FrameRate",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ fFrameRate=(float)temp;
+ }
+
+ size = 4;
+ if(RegQueryValueEx(myKey,"UseMultiPass",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ bAdvancedBlend=(int)temp;
+ size = 4;
+ iOffscreenDrawing=-1;
+ if(RegQueryValueEx(myKey,"OffscreenDrawingEx",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iOffscreenDrawing=temp;
+ if(iOffscreenDrawing==-1 &&
+ RegQueryValueEx(myKey,"OffscreenDrawing",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iOffscreenDrawing=temp*2;
+ size = 4;
+ if(RegQueryValueEx(myKey,"OpaquePass",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ bOpaquePass=(BOOL)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"VRamSize",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iVRamSize=(int)temp;
+// size = 4;
+// if(RegQueryValueEx(myKey,"UseAntiAlias",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+// bUseAntiAlias=(BOOL)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"TexQuality",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iTexQuality=(int)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"CfgFixes",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ dwCfgFixes=(int)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"UseFixes",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ bUseFixes=(BOOL)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"GteAccuracy",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ bGteAccuracy=(BOOL)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"UseMask",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iUseMask=(int)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"FastMdec",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ bUseFastMdec=(BOOL)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"15BitMdec",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ bUse15bitMdec=(BOOL)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"UseScanLines",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iUseScanLines=(int)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"ShowFPS",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iShowFPS=(int)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"KeepRatio",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ bKeepRatio=(BOOL)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"ScanBlend",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iScanBlend=(int)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"FrameTexType",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iFrameTexType=(int)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"FrameReadType",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iFrameReadType=(int)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"FullscreenBlur",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iBlurBuffer=(int)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"HiResTextures",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iHiResTextures=(int)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"NoScreenSaver",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iNoScreenSaver=(int)temp;
+
+ size=7;
+ RegQueryValueEx(myKey,"GPUKeys",0,&type,(LPBYTE)&szGPUKeys,&size);
+
+ RegCloseKey(myKey);
+ }
+ if(!iColDepth) iColDepth=32; // adjust color info
+ if(iUseMask) iZBufferDepth=16; // set zbuffer depth
+ else iZBufferDepth=0;
+ if(bUseFixes) dwActFixes=dwCfgFixes; // init game fix global
+ if(iFrameReadType==4) bFullVRam=TRUE; // set fullvram render flag (soft gpu)
+}
+
+////////////////////////////////////////////////////////////////////////
+// read registry: window size (called on fullscreen/window resize)
+////////////////////////////////////////////////////////////////////////
+
+void ReadWinSizeConfig(void)
+{
+ HKEY myKey;
+ DWORD temp;
+ DWORD type;
+ DWORD size;
+
+ iResX=800;iResY=600;
+ iWinSize=MAKELONG(400,300);
+ iBlurBuffer=0;
+
+ // registry key: still "psemu pro/pete tnt" for compatibility reasons
+
+ if (RegOpenKeyEx(HKEY_CURRENT_USER,"Software\\Vision Thing\\PSEmu Pro\\GPU\\PeteTNT",0,KEY_ALL_ACCESS,&myKey)==ERROR_SUCCESS)
+ {
+ size = 4;
+ if(RegQueryValueEx(myKey,"ResX",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iResX=(int)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"ResY",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iResY=(int)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"WinSize",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iWinSize=(int)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"FullscreenBlur",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iBlurBuffer=(int)temp;
+ RegCloseKey(myKey);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////
+// write registry
+////////////////////////////////////////////////////////////////////////
+
+void WriteConfig(void)
+{
+ HKEY myKey;
+ DWORD myDisp;
+ DWORD temp;
+
+ // registry key: still "psemu pro/pete tnt" for compatibility reasons
+
+ RegCreateKeyEx(HKEY_CURRENT_USER,"Software\\Vision Thing\\PSEmu Pro\\GPU\\PeteTNT",0,NULL,REG_OPTION_NON_VOLATILE,KEY_ALL_ACCESS,NULL,&myKey,&myDisp);
+ temp=iResX;
+ RegSetValueEx(myKey,"ResX",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=iResY;
+ RegSetValueEx(myKey,"ResY",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=iWinSize;
+ RegSetValueEx(myKey,"WinSize",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=iFilterType;
+ RegSetValueEx(myKey,"FilterType",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=bDrawDither;
+ RegSetValueEx(myKey,"DrawDither",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=bUseLines;
+ RegSetValueEx(myKey,"UseLines",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=bWindowMode;
+ RegSetValueEx(myKey,"WindowMode",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=iColDepth;
+ RegSetValueEx(myKey,"ColDepth",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=iForceVSync;
+ RegSetValueEx(myKey,"ForceVSync",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=bUseFrameLimit;
+ RegSetValueEx(myKey,"UseFrameLimit",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=bUseFrameSkip;
+ RegSetValueEx(myKey,"UseFrameSkip",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=iFrameLimit;
+ RegSetValueEx(myKey,"FrameLimit",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=(DWORD)fFrameRate;
+ RegSetValueEx(myKey,"FrameRate",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=*((DWORD *)&fFrameRate);
+ RegSetValueEx(myKey,"FrameRateFloat",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=bAdvancedBlend;
+ RegSetValueEx(myKey,"UseMultiPass",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=iOffscreenDrawing/2;
+ RegSetValueEx(myKey,"OffscreenDrawing",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=iOffscreenDrawing;
+ RegSetValueEx(myKey,"OffscreenDrawingEx",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=bOpaquePass;
+ RegSetValueEx(myKey,"OpaquePass",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=iVRamSize;
+ RegSetValueEx(myKey,"VRamSize",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+// temp=bUseAntiAlias;
+// RegSetValueEx(myKey,"UseAntiAlias",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=iTexQuality;
+ RegSetValueEx(myKey,"TexQuality",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=dwCfgFixes;
+ RegSetValueEx(myKey,"CfgFixes",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=bUseFixes;
+ RegSetValueEx(myKey,"UseFixes",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=bGteAccuracy;
+ RegSetValueEx(myKey,"GteAccuracy",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=iUseMask;
+ RegSetValueEx(myKey,"UseMask",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=bUseFastMdec;
+ RegSetValueEx(myKey,"FastMdec",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=bUse15bitMdec;
+ RegSetValueEx(myKey,"15BitMdec",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=iUseScanLines;
+ RegSetValueEx(myKey,"UseScanLines",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=iShowFPS;
+ RegSetValueEx(myKey,"ShowFPS",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=iFrameTexType;
+ RegSetValueEx(myKey,"FrameTexType",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=iFrameReadType;
+ RegSetValueEx(myKey,"FrameReadType",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=bKeepRatio;
+ RegSetValueEx(myKey,"KeepRatio",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=iBlurBuffer;
+ RegSetValueEx(myKey,"FullscreenBlur",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=iHiResTextures;
+ RegSetValueEx(myKey,"HiResTextures",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=iNoScreenSaver;
+ RegSetValueEx(myKey,"NoScreenSaver",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=iScanBlend;
+ RegSetValueEx(myKey,"ScanBlend",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ RegSetValueEx(myKey,"GPUKeys",0,REG_BINARY,(LPBYTE)szGPUKeys,7);
+
+ RegCloseKey(myKey);
+}
+
+////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////
+// Key definition window
+
+typedef struct
+{
+ char szName[10];
+ char cCode;
+}
+KEYSETS;
+
+// sepcial keys:
+
+KEYSETS tMKeys[]=
+{
+ {"SPACE", 0x20},
+ {"PRIOR", 0x21},
+ {"NEXT", 0x22},
+ {"END", 0x23},
+ {"HOME", 0x24},
+ {"LEFT", 0x25},
+ {"UP", 0x26},
+ {"RIGHT", 0x27},
+ {"DOWN", 0x28},
+ {"SELECT", 0x29},
+ {"PRINT", 0x2A},
+ {"EXECUTE", 0x2B},
+ {"SNAPSHOT", 0x2C},
+ {"INSERT", 0x2D},
+ {"DELETE", 0x2E},
+ {"HELP", 0x2F},
+ {"NUMPAD0", 0x60},
+ {"NUMPAD1", 0x61},
+ {"NUMPAD2", 0x62},
+ {"NUMPAD3", 0x63},
+ {"NUMPAD4", 0x64},
+ {"NUMPAD5", 0x65},
+ {"NUMPAD6", 0x66},
+ {"NUMPAD7", 0x67},
+ {"NUMPAD8", 0x68},
+ {"NUMPAD9", 0x69},
+ {"MULTIPLY", 0x6A},
+ {"ADD", 0x6B},
+ {"SEPARATOR", 0x6C},
+ {"SUBTRACT", 0x6D},
+ {"DECIMAL", 0x6E},
+ {"DIVIDE", 0x6F},
+ {"", 0x00}
+};
+
+// select key entry in combo box
+
+void SetGPUKey(HWND hWC,char szKey)
+{
+ int i,iCnt=ComboBox_GetCount(hWC);
+ for(i=0;i<iCnt;i++)
+ {
+ if(ComboBox_GetItemData(hWC,i)==szKey) break;
+ }
+ if(i!=iCnt) ComboBox_SetCurSel(hWC,i);
+}
+
+// key window proc
+
+BOOL CALLBACK KeyDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ switch(uMsg)
+ {
+ case WM_INITDIALOG: // init dialog
+ {
+ int i,j,k;char szB[2];HWND hWC;
+ for(i=IDC_KEY1;i<=IDC_KEY6;i++)
+ {
+ hWC=GetDlgItem(hW,i);
+
+ for(j=0;tMKeys[j].cCode!=0;j++) // fill special keys in combo
+ {
+ k=ComboBox_AddString(hWC,tMKeys[j].szName);
+ ComboBox_SetItemData(hWC,k,tMKeys[j].cCode);
+ }
+ for(j=0x30;j<=0x39;j++) // fill numbers in combo
+ {
+ wsprintf(szB,"%c",j);
+ k=ComboBox_AddString(hWC,szB);
+ ComboBox_SetItemData(hWC,k,j);
+ }
+ for(j=0x41;j<=0x5a;j++) // fill alphas in combo
+ {
+ wsprintf(szB,"%c",j);
+ k=ComboBox_AddString(hWC,szB);
+ ComboBox_SetItemData(hWC,k,j);
+ }
+ SetGPUKey(GetDlgItem(hW,i),szGPUKeys[i-IDC_KEY1]);
+ }
+ }return TRUE;
+
+ case WM_COMMAND:
+ {
+ switch(LOWORD(wParam))
+ {
+ case IDC_DEFAULT: // default button:
+ {
+ int i; // -> set defaults
+ for(i=IDC_KEY1;i<=IDC_KEY6;i++)
+ SetGPUKey(GetDlgItem(hW,i),szKeyDefaults[i-IDC_KEY1]);
+ }break;
+
+ case IDCANCEL: // cancel: just close window
+ EndDialog(hW,FALSE); return TRUE;
+
+ case IDOK: // ok: take key bindings
+ {
+ HWND hWC;int i;
+ for(i=IDC_KEY1;i<=IDC_KEY6;i++)
+ {
+ hWC=GetDlgItem(hW,i);
+ szGPUKeys[i-IDC_KEY1]=ComboBox_GetItemData(hWC,ComboBox_GetCurSel(hWC));
+ if(szGPUKeys[i-IDC_KEY1]<0x20) szGPUKeys[i-IDC_KEY1]=0x20;
+ }
+ EndDialog(hW,TRUE);
+ return TRUE;
+ }
+ }
+ }
+ }
+ return FALSE;
+}
+
+void OnKeyConfig(HWND hW) // call key dialog
+{
+ DialogBox(hInst,MAKEINTRESOURCE(IDD_KEYS),
+ hW,(DLGPROC)KeyDlgProc);
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// AboutDlg dialog (Windows)
+
+BOOL CALLBACK AboutDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ switch(uMsg)
+ {
+ case WM_COMMAND:
+ {
+ switch(LOWORD(wParam))
+ {
+ case IDOK: EndDialog(hW,TRUE);return TRUE;
+ }
+ }
+ }
+ return FALSE;
+}
diff --git a/win32/plugins/peopsxgl/winsrc/fps.c b/win32/plugins/peopsxgl/winsrc/fps.c
index 6faf82c6..2e751107 100644..100755
--- a/win32/plugins/peopsxgl/winsrc/fps.c
+++ b/win32/plugins/peopsxgl/winsrc/fps.c
@@ -1,641 +1,641 @@
-/***************************************************************************
- fps.c - description
- -------------------
- begin : Sun Mar 08 2009
- copyright : (C) 1999-2009 by Pete Bernert
- web : www.pbernert.com
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. See also the license.txt file for *
- * additional informations. *
- * *
- ***************************************************************************/
-
-//*************************************************************************//
-// History of changes:
-//
-// 2009/03/08 - Pete
-// - generic cleanup for the Peops release
-//
-//*************************************************************************//
-
-#include "stdafx.h"
-
-#define _IN_FPS
-
-#include "externals.h"
-
-////////////////////////////////////////////////////////////////////////
-// FPS stuff
-////////////////////////////////////////////////////////////////////////
-
-BOOL bIsPerformanceCounter=FALSE;
-float fFrameRateHz=0;
-DWORD dwFrameRateTicks=16;
-float fFrameRate;
-int iFrameLimit;
-BOOL bUseFrameLimit=FALSE;
-BOOL bUseFrameSkip=0;
-DWORD dwLaceCnt=0;
-
-LARGE_INTEGER liCPUFrequency;
-
-////////////////////////////////////////////////////////////////////////
-// FPS skipping / limit
-////////////////////////////////////////////////////////////////////////
-
-BOOL bInitCap = TRUE;
-float fps_skip = 0;
-float fps_cur = 0;
-
-void FrameCap (void)
-{
- static DWORD curticks, lastticks, _ticks_since_last_update;
- static DWORD TicksToWait = 0;
- static LARGE_INTEGER CurrentTime;
- static LARGE_INTEGER LastTime;
- static BOOL SkipNextWait = FALSE;
- BOOL Waiting = TRUE;
-
- //---------------------------------------------------------
- // init some static vars...
- // bInitCap is TRUE on startup and everytime the user
- // is toggling the frame limit
- //---------------------------------------------------------
-
- if(bInitCap)
- {
- bInitCap=FALSE;
- if (bIsPerformanceCounter)
- QueryPerformanceCounter(&LastTime);
- lastticks = timeGetTime();
- TicksToWait=0;
- return;
- }
-
- //---------------------------------------------------------
-
- if(bIsPerformanceCounter)
- {
- QueryPerformanceCounter(&CurrentTime);
- _ticks_since_last_update = CurrentTime.LowPart - LastTime.LowPart;
-
- //---------------------------------------------------------
- // check if diff > 1/2 sec, if yes: take mm timer value
- //---------------------------------------------------------
-
- curticks = timeGetTime();
- if(_ticks_since_last_update>(liCPUFrequency.LowPart>>1))
- {
- if(curticks < lastticks)
- _ticks_since_last_update = dwFrameRateTicks+TicksToWait+1;
- else _ticks_since_last_update = (liCPUFrequency.LowPart * (curticks - lastticks))/1000;
- }
-
- //---------------------------------------------------------
-
- if ((_ticks_since_last_update > TicksToWait) ||
- (CurrentTime.LowPart < LastTime.LowPart))
- {
- LastTime.HighPart = CurrentTime.HighPart;
- LastTime.LowPart = CurrentTime.LowPart;
-
- lastticks=curticks;
-
- if((_ticks_since_last_update-TicksToWait) > dwFrameRateTicks)
- TicksToWait=0;
- else TicksToWait=dwFrameRateTicks-(_ticks_since_last_update-TicksToWait);
- }
- else
- {
- while (Waiting)
- {
- QueryPerformanceCounter(&CurrentTime);
- _ticks_since_last_update = CurrentTime.LowPart - LastTime.LowPart;
-
- //---------------------------------------------------------
- // check if diff > 1/2 sec, if yes: take mm timer value
- //---------------------------------------------------------
- curticks = timeGetTime();
- if(_ticks_since_last_update>(liCPUFrequency.LowPart>>1))
- {
- if(curticks < lastticks)
- _ticks_since_last_update = TicksToWait+1;
- else _ticks_since_last_update = (liCPUFrequency.LowPart * (curticks - lastticks))/1000;
- }
- //---------------------------------------------------------
-
- if ((_ticks_since_last_update > TicksToWait) ||
- (CurrentTime.LowPart < LastTime.LowPart))
- {
- Waiting = FALSE;
-
- lastticks=curticks;
-
- LastTime.HighPart = CurrentTime.HighPart;
- LastTime.LowPart = CurrentTime.LowPart;
- TicksToWait = dwFrameRateTicks;
- }
- }
- }
- }
- else
- {
- curticks = timeGetTime();
- _ticks_since_last_update = curticks - lastticks;
-
- if ((_ticks_since_last_update > TicksToWait) ||
- (curticks < lastticks))
- {
- lastticks = curticks;
-
- if((_ticks_since_last_update-TicksToWait) > dwFrameRateTicks)
- TicksToWait=0;
- else TicksToWait=dwFrameRateTicks-(_ticks_since_last_update-TicksToWait);
- }
- else
- {
- while (Waiting)
- {
- curticks = timeGetTime();
- _ticks_since_last_update = curticks - lastticks;
- if ((_ticks_since_last_update > TicksToWait) ||
- (curticks < lastticks))
- {
- Waiting = FALSE;
- lastticks = curticks;
- TicksToWait = dwFrameRateTicks;
- }
- }
- }
- }
-}
-
-////////////////////////////////////////////////////////////////////////
-
-#define MAXSKIP 120
-#define MAXLACE 16
-
-void FrameSkip(void)
-{
- static int iNumSkips=0,iAdditionalSkip=0; // number of additional frames to skip
- static DWORD dwLastLace=0; // helper var for frame limitation
- static DWORD curticks, lastticks, _ticks_since_last_update;
- static LARGE_INTEGER CurrentTime;
- static LARGE_INTEGER LastTime;
-
- if(!dwLaceCnt) return; // important: if no updatelace happened, we ignore it completely
-
- if(iNumSkips) // we are in skipping mode?
- {
- dwLastLace+=dwLaceCnt; // -> calc frame limit helper (number of laces)
- bSkipNextFrame = TRUE; // -> we skip next frame
- iNumSkips--; // -> ok, one done
- }
- else // ok, no additional skipping has to be done...
- { // we check now, if some limitation is needed, or a new skipping has to get started
- DWORD dwWaitTime;
-
- if(bInitCap || bSkipNextFrame) // first time or we skipped before?
- {
- if(bUseFrameLimit && !bInitCap) // frame limit wanted and not first time called?
- {
- DWORD dwT=_ticks_since_last_update; // -> that's the time of the last drawn frame
- dwLastLace+=dwLaceCnt; // -> and that's the number of updatelace since the start of the last drawn frame
-
- if(bIsPerformanceCounter) // -> now we calc the time of the last drawn frame + the time we spent skipping
- {
- QueryPerformanceCounter(&CurrentTime);
- _ticks_since_last_update= dwT+CurrentTime.LowPart - LastTime.LowPart;
- }
- else
- {
- curticks = timeGetTime();
- _ticks_since_last_update= dwT+curticks - lastticks;
- }
-
- dwWaitTime=dwLastLace*dwFrameRateTicks; // -> and now we calc the time the real psx would have needed
-
- if(_ticks_since_last_update<dwWaitTime) // -> we were too fast?
- {
- if((dwWaitTime-_ticks_since_last_update)> // -> some more security, to prevent
- (60*dwFrameRateTicks)) // wrong waiting times
- _ticks_since_last_update=dwWaitTime;
-
- while(_ticks_since_last_update<dwWaitTime) // -> loop until we have reached the real psx time
- { // (that's the additional limitation, yup)
- if(bIsPerformanceCounter)
- {
- QueryPerformanceCounter(&CurrentTime);
- _ticks_since_last_update = dwT+CurrentTime.LowPart - LastTime.LowPart;
- }
- else
- {
- curticks = timeGetTime();
- _ticks_since_last_update = dwT+curticks - lastticks;
- }
- }
- }
- else // we were still too slow ?!!?
- {
- if(iAdditionalSkip<MAXSKIP) // -> well, somewhen we really have to stop skipping on very slow systems
- {
- iAdditionalSkip++; // -> inc our watchdog var
- dwLaceCnt=0; // -> reset lace count
- if(bIsPerformanceCounter) // -> ok, start time of the next frame
- QueryPerformanceCounter(&LastTime);
- lastticks = timeGetTime();
- return; // -> done, we will skip next frame to get more speed
- }
- }
- }
-
- bInitCap=FALSE; // -> ok, we have inited the frameskip func
- iAdditionalSkip=0; // -> init additional skip
- bSkipNextFrame=FALSE; // -> we don't skip the next frame
- if(bIsPerformanceCounter) // -> we store the start time of the next frame
- QueryPerformanceCounter(&LastTime);
- lastticks = timeGetTime();
- dwLaceCnt=0; // -> and we start to count the laces
- dwLastLace=0;
- _ticks_since_last_update=0;
- return; // -> done, the next frame will get drawn
- }
-
- bSkipNextFrame=FALSE; // init the frame skip signal to 'no skipping' first
-
- if(bIsPerformanceCounter) // get the current time (we are now at the end of one drawn frame)
- {
- QueryPerformanceCounter(&CurrentTime);
- _ticks_since_last_update = CurrentTime.LowPart - LastTime.LowPart;
- }
- else
- {
- curticks = timeGetTime();
- _ticks_since_last_update = curticks - lastticks;
- }
-
- dwLastLace=dwLaceCnt; // store curr count (frame limitation helper)
- dwWaitTime=dwLaceCnt*dwFrameRateTicks; // calc the 'real psx lace time'
-
- if(_ticks_since_last_update>dwWaitTime) // hey, we needed way too long for that frame...
- {
- if(bUseFrameLimit) // if limitation, we skip just next frame,
- { // and decide after, if we need to do more
- iNumSkips=0;
- }
- else
- {
- iNumSkips=_ticks_since_last_update/dwWaitTime; // -> calc number of frames to skip to catch up
- iNumSkips--; // -> since we already skip next frame, one down
- if(iNumSkips>MAXSKIP) iNumSkips=MAXSKIP; // -> well, somewhere we have to draw a line
- }
- bSkipNextFrame = TRUE; // -> signal for skipping the next frame
- }
- else // we were faster than real psx? fine :)
- if(bUseFrameLimit) // frame limit used? so we wait til the 'real psx time' has been reached
- {
- if(dwLaceCnt>MAXLACE) // -> security check
- _ticks_since_last_update=dwWaitTime;
-
- while(_ticks_since_last_update<dwWaitTime) // just do a waiting loop...
- {
- if(bIsPerformanceCounter)
- {
- QueryPerformanceCounter(&CurrentTime);
- _ticks_since_last_update = CurrentTime.LowPart - LastTime.LowPart;
- }
- else
- {
- curticks = timeGetTime();
- _ticks_since_last_update = curticks - lastticks;
- }
- }
- }
-
- if(bIsPerformanceCounter) // ok, start time of the next frame
- QueryPerformanceCounter(&LastTime);
- lastticks = timeGetTime();
- }
-
- dwLaceCnt=0; // init lace counter
-}
-
-////////////////////////////////////////////////////////////////////////
-
-void calcfps(void)
-{
- static DWORD curticks,_ticks_since_last_update,lastticks;
- static long fps_cnt = 0;
- static DWORD fps_tck = 1;
- static LARGE_INTEGER CurrentTime;
- static LARGE_INTEGER LastTime;
- static long fpsskip_cnt = 0;
- static DWORD fpsskip_tck = 1;
-
- if(bIsPerformanceCounter)
- {
- QueryPerformanceCounter(&CurrentTime);
- _ticks_since_last_update=CurrentTime.LowPart-LastTime.LowPart;
-
- //--------------------------------------------------//
- curticks = timeGetTime();
- if(_ticks_since_last_update>(liCPUFrequency.LowPart>>1))
- _ticks_since_last_update = (liCPUFrequency.LowPart * (curticks - lastticks))/1000;
- lastticks=curticks;
- //--------------------------------------------------//
-
- if(bUseFrameSkip && !bUseFrameLimit && _ticks_since_last_update)
- fps_skip=min(fps_skip,(((float)liCPUFrequency.LowPart) / ((float)_ticks_since_last_update) +1.0f));
-
- LastTime.HighPart = CurrentTime.HighPart;
- LastTime.LowPart = CurrentTime.LowPart;
- }
- else
- {
- curticks = timeGetTime();
- _ticks_since_last_update=curticks-lastticks;
-
- if(bUseFrameSkip && !bUseFrameLimit && _ticks_since_last_update)
- fps_skip=min(fps_skip,((float)1000/(float)_ticks_since_last_update+1.0f));
-
- lastticks = curticks;
- }
-
- if(bUseFrameSkip && bUseFrameLimit)
- {
- fpsskip_tck += _ticks_since_last_update;
-
- if(++fpsskip_cnt==2)
- {
- if(bIsPerformanceCounter)
- fps_skip = ((float)liCPUFrequency.LowPart) / ((float)fpsskip_tck) *2.0f;
- else
- fps_skip = (float)2000/(float)fpsskip_tck;
-
- fps_skip +=6.0f;
-
- fpsskip_cnt = 0;
- fpsskip_tck = 1;
- }
- }
-
- fps_tck += _ticks_since_last_update;
-
- if(++fps_cnt==10)
- {
- if(bIsPerformanceCounter)
- fps_cur = ((float)liCPUFrequency.LowPart) / ((float)fps_tck) *10.0f;
- else
- fps_cur = (float)10000/(float)fps_tck;
-
- fps_cnt = 0;
- fps_tck = 1;
-
- if(bUseFrameLimit && fps_cur>fFrameRateHz) // optical adjust ;) avoids flickering fps display
- fps_cur=fFrameRateHz;
- }
-}
-
-////////////////////////////////////////////////////////////////////////
-// PC FPS skipping / limit
-////////////////////////////////////////////////////////////////////////
-
-void PCFrameCap(void)
-{
- static DWORD curticks, lastticks, _ticks_since_last_update;
- static DWORD TicksToWait = 0;
- static LARGE_INTEGER CurrentTime;
- static LARGE_INTEGER LastTime;
- BOOL Waiting = TRUE;
-
- while (Waiting)
- {
- if(bIsPerformanceCounter)
- {
- QueryPerformanceCounter(&CurrentTime);
- _ticks_since_last_update = CurrentTime.LowPart - LastTime.LowPart;
-
- //------------------------------------------------//
- curticks = timeGetTime();
- if(_ticks_since_last_update>(liCPUFrequency.LowPart>>1))
- {
- if(curticks < lastticks)
- _ticks_since_last_update = TicksToWait+1;
- else _ticks_since_last_update = (liCPUFrequency.LowPart * (curticks - lastticks))/1000;
- }
- //------------------------------------------------//
-
- if ((_ticks_since_last_update > TicksToWait) ||
- (CurrentTime.LowPart < LastTime.LowPart))
- {
- Waiting = FALSE;
-
- lastticks=curticks;
-
- LastTime.HighPart = CurrentTime.HighPart;
- LastTime.LowPart = CurrentTime.LowPart;
- TicksToWait = (liCPUFrequency.LowPart / fFrameRateHz);
- }
- }
- else
- {
- curticks = timeGetTime();
- _ticks_since_last_update = curticks - lastticks;
- if ((_ticks_since_last_update > TicksToWait) ||
- (curticks < lastticks))
- {
- Waiting = FALSE;
- lastticks = curticks;
- TicksToWait = (1000 / (DWORD)fFrameRateHz);
- }
- }
- }
-}
-
-////////////////////////////////////////////////////////////////////////
-
-void PCcalcfps(void)
-{
- static DWORD curticks,_ticks_since_last_update,lastticks;
- static long fps_cnt = 0;
- static float fps_acc = 0;
- static LARGE_INTEGER CurrentTime;
- static LARGE_INTEGER LastTime;
- float CurrentFPS=0;
-
- if(bIsPerformanceCounter)
- {
- QueryPerformanceCounter(&CurrentTime);
- _ticks_since_last_update=CurrentTime.LowPart-LastTime.LowPart;
-
- //--------------------------------------------------//
- curticks = timeGetTime();
- if(_ticks_since_last_update>(liCPUFrequency.LowPart>>1))
- _ticks_since_last_update = (liCPUFrequency.LowPart * (curticks - lastticks))/1000;
- lastticks=curticks;
- //--------------------------------------------------//
-
- if(_ticks_since_last_update)
- {
- CurrentFPS = ((float)liCPUFrequency.LowPart) / ((float)_ticks_since_last_update);
- }
- else CurrentFPS = 0;
- LastTime.HighPart = CurrentTime.HighPart;
- LastTime.LowPart = CurrentTime.LowPart;
- }
- else
- {
- curticks = timeGetTime();
- if(_ticks_since_last_update=curticks-lastticks)
- CurrentFPS=(float)1000/(float)_ticks_since_last_update;
- else CurrentFPS = 0;
- lastticks = curticks;
- }
-
- fps_acc += CurrentFPS;
-
- if(++fps_cnt==10)
- {
- fps_cur = fps_acc / 10;
- fps_acc = 0;
- fps_cnt = 0;
- }
-
- fps_skip=CurrentFPS+1.0f;
-}
-
-////////////////////////////////////////////////////////////////////////
-
-void SetAutoFrameCap(void)
-{
- if(iFrameLimit==1)
- {
- fFrameRateHz = fFrameRate;
- if(bIsPerformanceCounter)
- dwFrameRateTicks=(liCPUFrequency.LowPart / fFrameRateHz);
- else dwFrameRateTicks=(1000 / (DWORD)fFrameRateHz);
- return;
- }
-
- if(dwActFixes&128)
- {
- if (PSXDisplay.Interlaced)
- fFrameRateHz = PSXDisplay.PAL?50.0f:60.0f;
- else fFrameRateHz = PSXDisplay.PAL?25.0f:30.0f;
- }
- else
- {
- //fFrameRateHz = PSXDisplay.PAL?50.0f:59.94f;
-
- if(PSXDisplay.PAL)
- {
- if (STATUSREG&GPUSTATUS_INTERLACED)
- fFrameRateHz=33868800.0f/677343.75f; // 50.00238
- else fFrameRateHz=33868800.0f/680595.00f; // 49.76351
- }
- else
- {
- if (STATUSREG&GPUSTATUS_INTERLACED)
- fFrameRateHz=33868800.0f/565031.25f; // 59.94146
- else fFrameRateHz=33868800.0f/566107.50f; // 59.82750
- }
-
- if(bIsPerformanceCounter)
- dwFrameRateTicks=(liCPUFrequency.LowPart / fFrameRateHz);
- else dwFrameRateTicks=(1000 / (DWORD)fFrameRateHz);
- }
-}
-
-////////////////////////////////////////////////////////////////////////
-
-void InitFrameCap(void) // inits cpu frequency info (on gpu startup)
-{
- if (QueryPerformanceFrequency (&liCPUFrequency))
- bIsPerformanceCounter = TRUE;
- else bIsPerformanceCounter = FALSE;
-}
-
-////////////////////////////////////////////////////////////////////////
-
-void ReInitFrameCap(void)
-{
- BOOL bOldPerformanceCounter=bIsPerformanceCounter; // store curr timer mode
-
- if(dwActFixes&0x10000) // check game fix... high performance counters are bad on some mb chipsets
- bIsPerformanceCounter=FALSE;
- else
- {
- if (QueryPerformanceFrequency (&liCPUFrequency))
- bIsPerformanceCounter = TRUE;
- else bIsPerformanceCounter = FALSE;
- }
-
- if(bOldPerformanceCounter!=bIsPerformanceCounter) // changed?
- {
- bInitCap = TRUE;
- SetAutoFrameCap();
- }
-}
-
-////////////////////////////////////////////////////////////////////////
-
-void SetFrameRateConfig(void)
-{
- if(fFrameRateHz==0)
- {
- if(iFrameLimit==2) fFrameRateHz=59.94f; // auto framerate? set some init val (no pal/ntsc known yet)
- else fFrameRateHz=fFrameRate; // else set user framerate
- }
-
- if(bIsPerformanceCounter)
- dwFrameRateTicks=(liCPUFrequency.LowPart / fFrameRateHz);
- else dwFrameRateTicks=(1000 / (DWORD)fFrameRateHz);
-}
-
-void CheckFrameRate(void) // called in updatelace (on every emulated psx vsync)
-{
- if(bUseFrameSkip)
- {
- if(!(dwActFixes&0x100))
- {
- dwLaceCnt++; // -> and store cnt of vsync between frames
- if(dwLaceCnt>=MAXLACE && bUseFrameLimit)
- {
- if(dwLaceCnt==MAXLACE) bInitCap=TRUE;
- FrameCap();
- }
- }
- else if(bUseFrameLimit) FrameCap();
- calcfps(); // -> calc fps display in skipping mode
- }
- else // -> non-skipping mode:
- {
- if(bUseFrameLimit) FrameCap();
- if(ulKeybits&KEY_SHOWFPS) calcfps();
- }
-}
-
-////////////////////////////////////////////////////////////////////////
-
-void CALLBACK GPUsetframelimit(unsigned long option) // new EPSXE interface func: main emu can enable/disable fps limitation this way
-{
- bInitCap = TRUE;
-
- if(option==1) // emu says: limit
- {
- bUseFrameLimit=TRUE;bUseFrameSkip=FALSE;iFrameLimit=2;
- SetAutoFrameCap();
- }
- else // emu says: no limit
- {
- bUseFrameLimit=FALSE;
- }
-}
-
-////////////////////////////////////////////////////////////////////////
+/***************************************************************************
+ fps.c - description
+ -------------------
+ begin : Sun Mar 08 2009
+ copyright : (C) 1999-2009 by Pete Bernert
+ web : www.pbernert.com
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. See also the license.txt file for *
+ * additional informations. *
+ * *
+ ***************************************************************************/
+
+//*************************************************************************//
+// History of changes:
+//
+// 2009/03/08 - Pete
+// - generic cleanup for the Peops release
+//
+//*************************************************************************//
+
+#include "stdafx.h"
+
+#define _IN_FPS
+
+#include "externals.h"
+
+////////////////////////////////////////////////////////////////////////
+// FPS stuff
+////////////////////////////////////////////////////////////////////////
+
+BOOL bIsPerformanceCounter=FALSE;
+float fFrameRateHz=0;
+DWORD dwFrameRateTicks=16;
+float fFrameRate;
+int iFrameLimit;
+BOOL bUseFrameLimit=FALSE;
+BOOL bUseFrameSkip=0;
+DWORD dwLaceCnt=0;
+
+LARGE_INTEGER liCPUFrequency;
+
+////////////////////////////////////////////////////////////////////////
+// FPS skipping / limit
+////////////////////////////////////////////////////////////////////////
+
+BOOL bInitCap = TRUE;
+float fps_skip = 0;
+float fps_cur = 0;
+
+void FrameCap (void)
+{
+ static DWORD curticks, lastticks, _ticks_since_last_update;
+ static DWORD TicksToWait = 0;
+ static LARGE_INTEGER CurrentTime;
+ static LARGE_INTEGER LastTime;
+ static BOOL SkipNextWait = FALSE;
+ BOOL Waiting = TRUE;
+
+ //---------------------------------------------------------
+ // init some static vars...
+ // bInitCap is TRUE on startup and everytime the user
+ // is toggling the frame limit
+ //---------------------------------------------------------
+
+ if(bInitCap)
+ {
+ bInitCap=FALSE;
+ if (bIsPerformanceCounter)
+ QueryPerformanceCounter(&LastTime);
+ lastticks = timeGetTime();
+ TicksToWait=0;
+ return;
+ }
+
+ //---------------------------------------------------------
+
+ if(bIsPerformanceCounter)
+ {
+ QueryPerformanceCounter(&CurrentTime);
+ _ticks_since_last_update = CurrentTime.LowPart - LastTime.LowPart;
+
+ //---------------------------------------------------------
+ // check if diff > 1/2 sec, if yes: take mm timer value
+ //---------------------------------------------------------
+
+ curticks = timeGetTime();
+ if(_ticks_since_last_update>(liCPUFrequency.LowPart>>1))
+ {
+ if(curticks < lastticks)
+ _ticks_since_last_update = dwFrameRateTicks+TicksToWait+1;
+ else _ticks_since_last_update = (liCPUFrequency.LowPart * (curticks - lastticks))/1000;
+ }
+
+ //---------------------------------------------------------
+
+ if ((_ticks_since_last_update > TicksToWait) ||
+ (CurrentTime.LowPart < LastTime.LowPart))
+ {
+ LastTime.HighPart = CurrentTime.HighPart;
+ LastTime.LowPart = CurrentTime.LowPart;
+
+ lastticks=curticks;
+
+ if((_ticks_since_last_update-TicksToWait) > dwFrameRateTicks)
+ TicksToWait=0;
+ else TicksToWait=dwFrameRateTicks-(_ticks_since_last_update-TicksToWait);
+ }
+ else
+ {
+ while (Waiting)
+ {
+ QueryPerformanceCounter(&CurrentTime);
+ _ticks_since_last_update = CurrentTime.LowPart - LastTime.LowPart;
+
+ //---------------------------------------------------------
+ // check if diff > 1/2 sec, if yes: take mm timer value
+ //---------------------------------------------------------
+ curticks = timeGetTime();
+ if(_ticks_since_last_update>(liCPUFrequency.LowPart>>1))
+ {
+ if(curticks < lastticks)
+ _ticks_since_last_update = TicksToWait+1;
+ else _ticks_since_last_update = (liCPUFrequency.LowPart * (curticks - lastticks))/1000;
+ }
+ //---------------------------------------------------------
+
+ if ((_ticks_since_last_update > TicksToWait) ||
+ (CurrentTime.LowPart < LastTime.LowPart))
+ {
+ Waiting = FALSE;
+
+ lastticks=curticks;
+
+ LastTime.HighPart = CurrentTime.HighPart;
+ LastTime.LowPart = CurrentTime.LowPart;
+ TicksToWait = dwFrameRateTicks;
+ }
+ }
+ }
+ }
+ else
+ {
+ curticks = timeGetTime();
+ _ticks_since_last_update = curticks - lastticks;
+
+ if ((_ticks_since_last_update > TicksToWait) ||
+ (curticks < lastticks))
+ {
+ lastticks = curticks;
+
+ if((_ticks_since_last_update-TicksToWait) > dwFrameRateTicks)
+ TicksToWait=0;
+ else TicksToWait=dwFrameRateTicks-(_ticks_since_last_update-TicksToWait);
+ }
+ else
+ {
+ while (Waiting)
+ {
+ curticks = timeGetTime();
+ _ticks_since_last_update = curticks - lastticks;
+ if ((_ticks_since_last_update > TicksToWait) ||
+ (curticks < lastticks))
+ {
+ Waiting = FALSE;
+ lastticks = curticks;
+ TicksToWait = dwFrameRateTicks;
+ }
+ }
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////
+
+#define MAXSKIP 120
+#define MAXLACE 16
+
+void FrameSkip(void)
+{
+ static int iNumSkips=0,iAdditionalSkip=0; // number of additional frames to skip
+ static DWORD dwLastLace=0; // helper var for frame limitation
+ static DWORD curticks, lastticks, _ticks_since_last_update;
+ static LARGE_INTEGER CurrentTime;
+ static LARGE_INTEGER LastTime;
+
+ if(!dwLaceCnt) return; // important: if no updatelace happened, we ignore it completely
+
+ if(iNumSkips) // we are in skipping mode?
+ {
+ dwLastLace+=dwLaceCnt; // -> calc frame limit helper (number of laces)
+ bSkipNextFrame = TRUE; // -> we skip next frame
+ iNumSkips--; // -> ok, one done
+ }
+ else // ok, no additional skipping has to be done...
+ { // we check now, if some limitation is needed, or a new skipping has to get started
+ DWORD dwWaitTime;
+
+ if(bInitCap || bSkipNextFrame) // first time or we skipped before?
+ {
+ if(bUseFrameLimit && !bInitCap) // frame limit wanted and not first time called?
+ {
+ DWORD dwT=_ticks_since_last_update; // -> that's the time of the last drawn frame
+ dwLastLace+=dwLaceCnt; // -> and that's the number of updatelace since the start of the last drawn frame
+
+ if(bIsPerformanceCounter) // -> now we calc the time of the last drawn frame + the time we spent skipping
+ {
+ QueryPerformanceCounter(&CurrentTime);
+ _ticks_since_last_update= dwT+CurrentTime.LowPart - LastTime.LowPart;
+ }
+ else
+ {
+ curticks = timeGetTime();
+ _ticks_since_last_update= dwT+curticks - lastticks;
+ }
+
+ dwWaitTime=dwLastLace*dwFrameRateTicks; // -> and now we calc the time the real psx would have needed
+
+ if(_ticks_since_last_update<dwWaitTime) // -> we were too fast?
+ {
+ if((dwWaitTime-_ticks_since_last_update)> // -> some more security, to prevent
+ (60*dwFrameRateTicks)) // wrong waiting times
+ _ticks_since_last_update=dwWaitTime;
+
+ while(_ticks_since_last_update<dwWaitTime) // -> loop until we have reached the real psx time
+ { // (that's the additional limitation, yup)
+ if(bIsPerformanceCounter)
+ {
+ QueryPerformanceCounter(&CurrentTime);
+ _ticks_since_last_update = dwT+CurrentTime.LowPart - LastTime.LowPart;
+ }
+ else
+ {
+ curticks = timeGetTime();
+ _ticks_since_last_update = dwT+curticks - lastticks;
+ }
+ }
+ }
+ else // we were still too slow ?!!?
+ {
+ if(iAdditionalSkip<MAXSKIP) // -> well, somewhen we really have to stop skipping on very slow systems
+ {
+ iAdditionalSkip++; // -> inc our watchdog var
+ dwLaceCnt=0; // -> reset lace count
+ if(bIsPerformanceCounter) // -> ok, start time of the next frame
+ QueryPerformanceCounter(&LastTime);
+ lastticks = timeGetTime();
+ return; // -> done, we will skip next frame to get more speed
+ }
+ }
+ }
+
+ bInitCap=FALSE; // -> ok, we have inited the frameskip func
+ iAdditionalSkip=0; // -> init additional skip
+ bSkipNextFrame=FALSE; // -> we don't skip the next frame
+ if(bIsPerformanceCounter) // -> we store the start time of the next frame
+ QueryPerformanceCounter(&LastTime);
+ lastticks = timeGetTime();
+ dwLaceCnt=0; // -> and we start to count the laces
+ dwLastLace=0;
+ _ticks_since_last_update=0;
+ return; // -> done, the next frame will get drawn
+ }
+
+ bSkipNextFrame=FALSE; // init the frame skip signal to 'no skipping' first
+
+ if(bIsPerformanceCounter) // get the current time (we are now at the end of one drawn frame)
+ {
+ QueryPerformanceCounter(&CurrentTime);
+ _ticks_since_last_update = CurrentTime.LowPart - LastTime.LowPart;
+ }
+ else
+ {
+ curticks = timeGetTime();
+ _ticks_since_last_update = curticks - lastticks;
+ }
+
+ dwLastLace=dwLaceCnt; // store curr count (frame limitation helper)
+ dwWaitTime=dwLaceCnt*dwFrameRateTicks; // calc the 'real psx lace time'
+
+ if(_ticks_since_last_update>dwWaitTime) // hey, we needed way too long for that frame...
+ {
+ if(bUseFrameLimit) // if limitation, we skip just next frame,
+ { // and decide after, if we need to do more
+ iNumSkips=0;
+ }
+ else
+ {
+ iNumSkips=_ticks_since_last_update/dwWaitTime; // -> calc number of frames to skip to catch up
+ iNumSkips--; // -> since we already skip next frame, one down
+ if(iNumSkips>MAXSKIP) iNumSkips=MAXSKIP; // -> well, somewhere we have to draw a line
+ }
+ bSkipNextFrame = TRUE; // -> signal for skipping the next frame
+ }
+ else // we were faster than real psx? fine :)
+ if(bUseFrameLimit) // frame limit used? so we wait til the 'real psx time' has been reached
+ {
+ if(dwLaceCnt>MAXLACE) // -> security check
+ _ticks_since_last_update=dwWaitTime;
+
+ while(_ticks_since_last_update<dwWaitTime) // just do a waiting loop...
+ {
+ if(bIsPerformanceCounter)
+ {
+ QueryPerformanceCounter(&CurrentTime);
+ _ticks_since_last_update = CurrentTime.LowPart - LastTime.LowPart;
+ }
+ else
+ {
+ curticks = timeGetTime();
+ _ticks_since_last_update = curticks - lastticks;
+ }
+ }
+ }
+
+ if(bIsPerformanceCounter) // ok, start time of the next frame
+ QueryPerformanceCounter(&LastTime);
+ lastticks = timeGetTime();
+ }
+
+ dwLaceCnt=0; // init lace counter
+}
+
+////////////////////////////////////////////////////////////////////////
+
+void calcfps(void)
+{
+ static DWORD curticks,_ticks_since_last_update,lastticks;
+ static long fps_cnt = 0;
+ static DWORD fps_tck = 1;
+ static LARGE_INTEGER CurrentTime;
+ static LARGE_INTEGER LastTime;
+ static long fpsskip_cnt = 0;
+ static DWORD fpsskip_tck = 1;
+
+ if(bIsPerformanceCounter)
+ {
+ QueryPerformanceCounter(&CurrentTime);
+ _ticks_since_last_update=CurrentTime.LowPart-LastTime.LowPart;
+
+ //--------------------------------------------------//
+ curticks = timeGetTime();
+ if(_ticks_since_last_update>(liCPUFrequency.LowPart>>1))
+ _ticks_since_last_update = (liCPUFrequency.LowPart * (curticks - lastticks))/1000;
+ lastticks=curticks;
+ //--------------------------------------------------//
+
+ if(bUseFrameSkip && !bUseFrameLimit && _ticks_since_last_update)
+ fps_skip=min(fps_skip,(((float)liCPUFrequency.LowPart) / ((float)_ticks_since_last_update) +1.0f));
+
+ LastTime.HighPart = CurrentTime.HighPart;
+ LastTime.LowPart = CurrentTime.LowPart;
+ }
+ else
+ {
+ curticks = timeGetTime();
+ _ticks_since_last_update=curticks-lastticks;
+
+ if(bUseFrameSkip && !bUseFrameLimit && _ticks_since_last_update)
+ fps_skip=min(fps_skip,((float)1000/(float)_ticks_since_last_update+1.0f));
+
+ lastticks = curticks;
+ }
+
+ if(bUseFrameSkip && bUseFrameLimit)
+ {
+ fpsskip_tck += _ticks_since_last_update;
+
+ if(++fpsskip_cnt==2)
+ {
+ if(bIsPerformanceCounter)
+ fps_skip = ((float)liCPUFrequency.LowPart) / ((float)fpsskip_tck) *2.0f;
+ else
+ fps_skip = (float)2000/(float)fpsskip_tck;
+
+ fps_skip +=6.0f;
+
+ fpsskip_cnt = 0;
+ fpsskip_tck = 1;
+ }
+ }
+
+ fps_tck += _ticks_since_last_update;
+
+ if(++fps_cnt==10)
+ {
+ if(bIsPerformanceCounter)
+ fps_cur = ((float)liCPUFrequency.LowPart) / ((float)fps_tck) *10.0f;
+ else
+ fps_cur = (float)10000/(float)fps_tck;
+
+ fps_cnt = 0;
+ fps_tck = 1;
+
+ if(bUseFrameLimit && fps_cur>fFrameRateHz) // optical adjust ;) avoids flickering fps display
+ fps_cur=fFrameRateHz;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////
+// PC FPS skipping / limit
+////////////////////////////////////////////////////////////////////////
+
+void PCFrameCap(void)
+{
+ static DWORD curticks, lastticks, _ticks_since_last_update;
+ static DWORD TicksToWait = 0;
+ static LARGE_INTEGER CurrentTime;
+ static LARGE_INTEGER LastTime;
+ BOOL Waiting = TRUE;
+
+ while (Waiting)
+ {
+ if(bIsPerformanceCounter)
+ {
+ QueryPerformanceCounter(&CurrentTime);
+ _ticks_since_last_update = CurrentTime.LowPart - LastTime.LowPart;
+
+ //------------------------------------------------//
+ curticks = timeGetTime();
+ if(_ticks_since_last_update>(liCPUFrequency.LowPart>>1))
+ {
+ if(curticks < lastticks)
+ _ticks_since_last_update = TicksToWait+1;
+ else _ticks_since_last_update = (liCPUFrequency.LowPart * (curticks - lastticks))/1000;
+ }
+ //------------------------------------------------//
+
+ if ((_ticks_since_last_update > TicksToWait) ||
+ (CurrentTime.LowPart < LastTime.LowPart))
+ {
+ Waiting = FALSE;
+
+ lastticks=curticks;
+
+ LastTime.HighPart = CurrentTime.HighPart;
+ LastTime.LowPart = CurrentTime.LowPart;
+ TicksToWait = (liCPUFrequency.LowPart / fFrameRateHz);
+ }
+ }
+ else
+ {
+ curticks = timeGetTime();
+ _ticks_since_last_update = curticks - lastticks;
+ if ((_ticks_since_last_update > TicksToWait) ||
+ (curticks < lastticks))
+ {
+ Waiting = FALSE;
+ lastticks = curticks;
+ TicksToWait = (1000 / (DWORD)fFrameRateHz);
+ }
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////
+
+void PCcalcfps(void)
+{
+ static DWORD curticks,_ticks_since_last_update,lastticks;
+ static long fps_cnt = 0;
+ static float fps_acc = 0;
+ static LARGE_INTEGER CurrentTime;
+ static LARGE_INTEGER LastTime;
+ float CurrentFPS=0;
+
+ if(bIsPerformanceCounter)
+ {
+ QueryPerformanceCounter(&CurrentTime);
+ _ticks_since_last_update=CurrentTime.LowPart-LastTime.LowPart;
+
+ //--------------------------------------------------//
+ curticks = timeGetTime();
+ if(_ticks_since_last_update>(liCPUFrequency.LowPart>>1))
+ _ticks_since_last_update = (liCPUFrequency.LowPart * (curticks - lastticks))/1000;
+ lastticks=curticks;
+ //--------------------------------------------------//
+
+ if(_ticks_since_last_update)
+ {
+ CurrentFPS = ((float)liCPUFrequency.LowPart) / ((float)_ticks_since_last_update);
+ }
+ else CurrentFPS = 0;
+ LastTime.HighPart = CurrentTime.HighPart;
+ LastTime.LowPart = CurrentTime.LowPart;
+ }
+ else
+ {
+ curticks = timeGetTime();
+ if(_ticks_since_last_update=curticks-lastticks)
+ CurrentFPS=(float)1000/(float)_ticks_since_last_update;
+ else CurrentFPS = 0;
+ lastticks = curticks;
+ }
+
+ fps_acc += CurrentFPS;
+
+ if(++fps_cnt==10)
+ {
+ fps_cur = fps_acc / 10;
+ fps_acc = 0;
+ fps_cnt = 0;
+ }
+
+ fps_skip=CurrentFPS+1.0f;
+}
+
+////////////////////////////////////////////////////////////////////////
+
+void SetAutoFrameCap(void)
+{
+ if(iFrameLimit==1)
+ {
+ fFrameRateHz = fFrameRate;
+ if(bIsPerformanceCounter)
+ dwFrameRateTicks=(liCPUFrequency.LowPart / fFrameRateHz);
+ else dwFrameRateTicks=(1000 / (DWORD)fFrameRateHz);
+ return;
+ }
+
+ if(dwActFixes&128)
+ {
+ if (PSXDisplay.Interlaced)
+ fFrameRateHz = PSXDisplay.PAL?50.0f:60.0f;
+ else fFrameRateHz = PSXDisplay.PAL?25.0f:30.0f;
+ }
+ else
+ {
+ //fFrameRateHz = PSXDisplay.PAL?50.0f:59.94f;
+
+ if(PSXDisplay.PAL)
+ {
+ if (STATUSREG&GPUSTATUS_INTERLACED)
+ fFrameRateHz=33868800.0f/677343.75f; // 50.00238
+ else fFrameRateHz=33868800.0f/680595.00f; // 49.76351
+ }
+ else
+ {
+ if (STATUSREG&GPUSTATUS_INTERLACED)
+ fFrameRateHz=33868800.0f/565031.25f; // 59.94146
+ else fFrameRateHz=33868800.0f/566107.50f; // 59.82750
+ }
+
+ if(bIsPerformanceCounter)
+ dwFrameRateTicks=(liCPUFrequency.LowPart / fFrameRateHz);
+ else dwFrameRateTicks=(1000 / (DWORD)fFrameRateHz);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////
+
+void InitFrameCap(void) // inits cpu frequency info (on gpu startup)
+{
+ if (QueryPerformanceFrequency (&liCPUFrequency))
+ bIsPerformanceCounter = TRUE;
+ else bIsPerformanceCounter = FALSE;
+}
+
+////////////////////////////////////////////////////////////////////////
+
+void ReInitFrameCap(void)
+{
+ BOOL bOldPerformanceCounter=bIsPerformanceCounter; // store curr timer mode
+
+ if(dwActFixes&0x10000) // check game fix... high performance counters are bad on some mb chipsets
+ bIsPerformanceCounter=FALSE;
+ else
+ {
+ if (QueryPerformanceFrequency (&liCPUFrequency))
+ bIsPerformanceCounter = TRUE;
+ else bIsPerformanceCounter = FALSE;
+ }
+
+ if(bOldPerformanceCounter!=bIsPerformanceCounter) // changed?
+ {
+ bInitCap = TRUE;
+ SetAutoFrameCap();
+ }
+}
+
+////////////////////////////////////////////////////////////////////////
+
+void SetFrameRateConfig(void)
+{
+ if(fFrameRateHz==0)
+ {
+ if(iFrameLimit==2) fFrameRateHz=59.94f; // auto framerate? set some init val (no pal/ntsc known yet)
+ else fFrameRateHz=fFrameRate; // else set user framerate
+ }
+
+ if(bIsPerformanceCounter)
+ dwFrameRateTicks=(liCPUFrequency.LowPart / fFrameRateHz);
+ else dwFrameRateTicks=(1000 / (DWORD)fFrameRateHz);
+}
+
+void CheckFrameRate(void) // called in updatelace (on every emulated psx vsync)
+{
+ if(bUseFrameSkip)
+ {
+ if(!(dwActFixes&0x100))
+ {
+ dwLaceCnt++; // -> and store cnt of vsync between frames
+ if(dwLaceCnt>=MAXLACE && bUseFrameLimit)
+ {
+ if(dwLaceCnt==MAXLACE) bInitCap=TRUE;
+ FrameCap();
+ }
+ }
+ else if(bUseFrameLimit) FrameCap();
+ calcfps(); // -> calc fps display in skipping mode
+ }
+ else // -> non-skipping mode:
+ {
+ if(bUseFrameLimit) FrameCap();
+ if(ulKeybits&KEY_SHOWFPS) calcfps();
+ }
+}
+
+////////////////////////////////////////////////////////////////////////
+
+void CALLBACK GPUsetframelimit(unsigned long option) // new EPSXE interface func: main emu can enable/disable fps limitation this way
+{
+ bInitCap = TRUE;
+
+ if(option==1) // emu says: limit
+ {
+ bUseFrameLimit=TRUE;bUseFrameSkip=FALSE;iFrameLimit=2;
+ SetAutoFrameCap();
+ }
+ else // emu says: no limit
+ {
+ bUseFrameLimit=FALSE;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////
diff --git a/win32/plugins/peopsxgl/winsrc/key.c b/win32/plugins/peopsxgl/winsrc/key.c
index f1ad8ca3..5884b040 100644..100755
--- a/win32/plugins/peopsxgl/winsrc/key.c
+++ b/win32/plugins/peopsxgl/winsrc/key.c
@@ -1,203 +1,203 @@
-/***************************************************************************
- key.c - description
- -------------------
- begin : Sun Mar 08 2009
- copyright : (C) 1999-2009 by Pete Bernert
- web : www.pbernert.com
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. See also the license.txt file for *
- * additional informations. *
- * *
- ***************************************************************************/
-
-//*************************************************************************//
-// History of changes:
-//
-// 2009/03/08 - Pete
-// - generic cleanup for the Peops release
-//
-//*************************************************************************//
-
-#include "stdafx.h"
-
-#define _IN_KEY
-
-#include "externals.h"
-#include "menu.h"
-#include "texture.h"
-#include "draw.h"
-#include "fps.h"
-
-////////////////////////////////////////////////////////////////////////
-// KeyBoard handler stuff
-////////////////////////////////////////////////////////////////////////
-
-uint32_t ulKeybits;
-
-static WNDPROC pOldWinProc=0;
-char szGPUKeys[7];
-
-////////////////////////////////////////////////////////////////////////
-// keyboard handler (WINDOWS)
-////////////////////////////////////////////////////////////////////////
-
-LRESULT CALLBACK key_winproc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam)
-{
- switch(message)
- {
- case WM_SYSCOMMAND:
- if(iNoScreenSaver && wParam==SC_SCREENSAVE) return 0L;
- break;
-
- case WM_KEYDOWN:
- if(wParam==(WPARAM)szGPUKeys[1]) {ulKeybits|=KEY_RESETTEXSTORE;break;}
- break;
-
- case WM_SYSKEYUP:
- if(wParam==VK_RETURN) bChangeWinMode=TRUE;
- break;
-
- case WM_KEYUP:
- if(wParam==(WPARAM)szGPUKeys[0])
- {
- if(ulKeybits&KEY_SHOWFPS)
- {
- ulKeybits&=~KEY_SHOWFPS;
- HideText();
- DestroyPic();
- }
- else
- {
- ulKeybits|=KEY_SHOWFPS;
- szDispBuf[0]=0;
- BuildDispMenu(0);
- }
- break;
- }
- if(wParam==(WPARAM)szGPUKeys[1]) {ShowGpuPic();break;}
- if(wParam==(WPARAM)szGPUKeys[2]) {SwitchDispMenu(-1); break;}
- if(wParam==(WPARAM)szGPUKeys[3]) {SwitchDispMenu( 1); break;}
- if(wParam==(WPARAM)szGPUKeys[4])
- {
- if(GetAsyncKeyState(VK_SHIFT)&32768)
- {
- if(iBlurBuffer) iBlurBuffer=0;
- else iBlurBuffer=1;
- }
- BuildDispMenu(-1);
- break;
- }
- if(wParam==(WPARAM)szGPUKeys[5]) {BuildDispMenu( 1); break;}
-
- }
- return pOldWinProc( hwnd, message, wParam, lParam );
-}
-
-////////////////////////////////////////////////////////////////////////
-
-void InitKeyHandler(void)
-{
- if(!pOldWinProc)
- {
- pOldWinProc = (WNDPROC)GetWindowLong(hWWindow, GWL_WNDPROC );
- SetWindowLong(hWWindow, GWL_WNDPROC, (long)key_winproc);
- }
-}
-
-////////////////////////////////////////////////////////////////////////
-
-void ExitKeyHandler(void)
-{
- if(pOldWinProc)
- SetWindowLong(hWWindow,GWL_WNDPROC, // set old proc
- (long)pOldWinProc);
- pOldWinProc = 0;
-}
-
-////////////////////////////////////////////////////////////////////////
-// reset stuff on special keyboard commands
-////////////////////////////////////////////////////////////////////////
-
-void ResetStuff(void)
-{
- ResetTextureArea(TRUE);
- ulKeybits&=~KEY_RESETTEXSTORE;
-
- if(ulKeybits&KEY_BLACKWHITE)
- {
- if(bUseFixes) {bUseFixes=FALSE;dwActFixes=0;}
- else {bUseFixes=TRUE; dwActFixes=dwCfgFixes;}
- SetExtGLFuncs();
- if(iFrameLimit==2) SetAutoFrameCap();
- ulKeybits&=~KEY_BLACKWHITE;
- }
-
- if(ulKeybits&KEY_RESETFILTER)
- {
- if(ulKeybits&KEY_STEPDOWN)
- iFilterType--;
- else iFilterType++;
- if(iFilterType>6) iFilterType=0;
- if(iFilterType<0) iFilterType=6;
- SetExtGLFuncs();
- ulKeybits&=~(KEY_RESETFILTER|KEY_STEPDOWN);
- BuildDispMenu(0);
- }
-
- if(ulKeybits&KEY_RESETOPAQUE)
- {
- bOpaquePass=!bOpaquePass;
- SetExtGLFuncs();
- ulKeybits&=~KEY_RESETOPAQUE;
- BuildDispMenu(0);
- }
-
- if(ulKeybits&KEY_RESETADVBLEND)
- {
- bAdvancedBlend=!bAdvancedBlend;
- SetExtGLFuncs();
- ulKeybits&=~KEY_RESETADVBLEND;
- BuildDispMenu(0);
- }
-
- if(ulKeybits&KEY_RESETDITHER)
- {
- bDrawDither=!bDrawDither;
- if(bDrawDither) glEnable(GL_DITHER);
- else glDisable(GL_DITHER);
- ulKeybits&=~KEY_RESETDITHER;
- BuildDispMenu(0);
- }
-
- if(ulKeybits & KEY_TOGGLEFBTEXTURE)
- {
- if(ulKeybits&KEY_STEPDOWN)
- iFrameTexType--;
- else iFrameTexType++;
- if(iFrameTexType>3) iFrameTexType=0;
- if(iFrameTexType<0) iFrameTexType=3;
- if(gTexFrameName!=0)
- glDeleteTextures(1, &gTexFrameName);
- gTexFrameName=0;
- ulKeybits&=~(KEY_TOGGLEFBTEXTURE|KEY_STEPDOWN);
- }
-
- if(ulKeybits & KEY_TOGGLEFBREAD)
- {
- if(ulKeybits&KEY_STEPDOWN)
- iFrameReadType--;
- else iFrameReadType++;
- if(iFrameReadType>4) iFrameReadType=0;
- if(iFrameReadType<0) iFrameReadType=4;
- if(iFrameReadType==4) bFullVRam=TRUE;
- else bFullVRam=FALSE;
- iRenderFVR=0;
- ulKeybits&=~(KEY_TOGGLEFBREAD|KEY_STEPDOWN);
- }
-}
+/***************************************************************************
+ key.c - description
+ -------------------
+ begin : Sun Mar 08 2009
+ copyright : (C) 1999-2009 by Pete Bernert
+ web : www.pbernert.com
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. See also the license.txt file for *
+ * additional informations. *
+ * *
+ ***************************************************************************/
+
+//*************************************************************************//
+// History of changes:
+//
+// 2009/03/08 - Pete
+// - generic cleanup for the Peops release
+//
+//*************************************************************************//
+
+#include "stdafx.h"
+
+#define _IN_KEY
+
+#include "externals.h"
+#include "menu.h"
+#include "texture.h"
+#include "draw.h"
+#include "fps.h"
+
+////////////////////////////////////////////////////////////////////////
+// KeyBoard handler stuff
+////////////////////////////////////////////////////////////////////////
+
+uint32_t ulKeybits;
+
+static WNDPROC pOldWinProc=0;
+char szGPUKeys[7];
+
+////////////////////////////////////////////////////////////////////////
+// keyboard handler (WINDOWS)
+////////////////////////////////////////////////////////////////////////
+
+LRESULT CALLBACK key_winproc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam)
+{
+ switch(message)
+ {
+ case WM_SYSCOMMAND:
+ if(iNoScreenSaver && wParam==SC_SCREENSAVE) return 0L;
+ break;
+
+ case WM_KEYDOWN:
+ if(wParam==(WPARAM)szGPUKeys[1]) {ulKeybits|=KEY_RESETTEXSTORE;break;}
+ break;
+
+ case WM_SYSKEYUP:
+ if(wParam==VK_RETURN) bChangeWinMode=TRUE;
+ break;
+
+ case WM_KEYUP:
+ if(wParam==(WPARAM)szGPUKeys[0])
+ {
+ if(ulKeybits&KEY_SHOWFPS)
+ {
+ ulKeybits&=~KEY_SHOWFPS;
+ HideText();
+ DestroyPic();
+ }
+ else
+ {
+ ulKeybits|=KEY_SHOWFPS;
+ szDispBuf[0]=0;
+ BuildDispMenu(0);
+ }
+ break;
+ }
+ if(wParam==(WPARAM)szGPUKeys[1]) {ShowGpuPic();break;}
+ if(wParam==(WPARAM)szGPUKeys[2]) {SwitchDispMenu(-1); break;}
+ if(wParam==(WPARAM)szGPUKeys[3]) {SwitchDispMenu( 1); break;}
+ if(wParam==(WPARAM)szGPUKeys[4])
+ {
+ if(GetAsyncKeyState(VK_SHIFT)&32768)
+ {
+ if(iBlurBuffer) iBlurBuffer=0;
+ else iBlurBuffer=1;
+ }
+ BuildDispMenu(-1);
+ break;
+ }
+ if(wParam==(WPARAM)szGPUKeys[5]) {BuildDispMenu( 1); break;}
+
+ }
+ return pOldWinProc( hwnd, message, wParam, lParam );
+}
+
+////////////////////////////////////////////////////////////////////////
+
+void InitKeyHandler(void)
+{
+ if(!pOldWinProc)
+ {
+ pOldWinProc = (WNDPROC)GetWindowLong(hWWindow, GWL_WNDPROC );
+ SetWindowLong(hWWindow, GWL_WNDPROC, (long)key_winproc);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////
+
+void ExitKeyHandler(void)
+{
+ if(pOldWinProc)
+ SetWindowLong(hWWindow,GWL_WNDPROC, // set old proc
+ (long)pOldWinProc);
+ pOldWinProc = 0;
+}
+
+////////////////////////////////////////////////////////////////////////
+// reset stuff on special keyboard commands
+////////////////////////////////////////////////////////////////////////
+
+void ResetStuff(void)
+{
+ ResetTextureArea(TRUE);
+ ulKeybits&=~KEY_RESETTEXSTORE;
+
+ if(ulKeybits&KEY_BLACKWHITE)
+ {
+ if(bUseFixes) {bUseFixes=FALSE;dwActFixes=0;}
+ else {bUseFixes=TRUE; dwActFixes=dwCfgFixes;}
+ SetExtGLFuncs();
+ if(iFrameLimit==2) SetAutoFrameCap();
+ ulKeybits&=~KEY_BLACKWHITE;
+ }
+
+ if(ulKeybits&KEY_RESETFILTER)
+ {
+ if(ulKeybits&KEY_STEPDOWN)
+ iFilterType--;
+ else iFilterType++;
+ if(iFilterType>6) iFilterType=0;
+ if(iFilterType<0) iFilterType=6;
+ SetExtGLFuncs();
+ ulKeybits&=~(KEY_RESETFILTER|KEY_STEPDOWN);
+ BuildDispMenu(0);
+ }
+
+ if(ulKeybits&KEY_RESETOPAQUE)
+ {
+ bOpaquePass=!bOpaquePass;
+ SetExtGLFuncs();
+ ulKeybits&=~KEY_RESETOPAQUE;
+ BuildDispMenu(0);
+ }
+
+ if(ulKeybits&KEY_RESETADVBLEND)
+ {
+ bAdvancedBlend=!bAdvancedBlend;
+ SetExtGLFuncs();
+ ulKeybits&=~KEY_RESETADVBLEND;
+ BuildDispMenu(0);
+ }
+
+ if(ulKeybits&KEY_RESETDITHER)
+ {
+ bDrawDither=!bDrawDither;
+ if(bDrawDither) glEnable(GL_DITHER);
+ else glDisable(GL_DITHER);
+ ulKeybits&=~KEY_RESETDITHER;
+ BuildDispMenu(0);
+ }
+
+ if(ulKeybits & KEY_TOGGLEFBTEXTURE)
+ {
+ if(ulKeybits&KEY_STEPDOWN)
+ iFrameTexType--;
+ else iFrameTexType++;
+ if(iFrameTexType>3) iFrameTexType=0;
+ if(iFrameTexType<0) iFrameTexType=3;
+ if(gTexFrameName!=0)
+ glDeleteTextures(1, &gTexFrameName);
+ gTexFrameName=0;
+ ulKeybits&=~(KEY_TOGGLEFBTEXTURE|KEY_STEPDOWN);
+ }
+
+ if(ulKeybits & KEY_TOGGLEFBREAD)
+ {
+ if(ulKeybits&KEY_STEPDOWN)
+ iFrameReadType--;
+ else iFrameReadType++;
+ if(iFrameReadType>4) iFrameReadType=0;
+ if(iFrameReadType<0) iFrameReadType=4;
+ if(iFrameReadType==4) bFullVRam=TRUE;
+ else bFullVRam=FALSE;
+ iRenderFVR=0;
+ ulKeybits&=~(KEY_TOGGLEFBREAD|KEY_STEPDOWN);
+ }
+}
diff --git a/win32/plugins/peopsxgl/winsrc/ssave.c b/win32/plugins/peopsxgl/winsrc/ssave.c
index 40a75956..8665a5b3 100644..100755
--- a/win32/plugins/peopsxgl/winsrc/ssave.c
+++ b/win32/plugins/peopsxgl/winsrc/ssave.c
@@ -1,65 +1,65 @@
-/***************************************************************************
- ssave.c - description
- -------------------
- begin : Sun Mar 08 2009
- copyright : (C) 1999-2009 by Pete Bernert
- web : www.pbernert.com
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. See also the license.txt file for *
- * additional informations. *
- * *
- ***************************************************************************/
-
-//*************************************************************************//
-// History of changes:
-//
-// 2009/03/08 - Pete
-// - generic cleanup for the Peops release
-//
-//*************************************************************************//
-
-#include "stdafx.h"
-
-#include "externals.h"
-
-////////////////////////////////////////////////////////////////////////
-// screensaver stuff: dynamically load kernel32.dll to avoid export dependeny
-////////////////////////////////////////////////////////////////////////
-
-#ifdef __MINGW32__
-#define EXECUTION_STATE DWORD
-#endif
-
-void EnableScreenSaver(BOOL bEnab)
-{
- HINSTANCE hKernel32 = NULL;
- EXECUTION_STATE (WINAPI *D_SetThreadExecutionState)(EXECUTION_STATE esFlags);
-
- if(bEnab)
- {
- hKernel32 = LoadLibrary("kernel32.dll");
- if(hKernel32 != NULL)
- {
- if((D_SetThreadExecutionState=(EXECUTION_STATE (WINAPI *)(EXECUTION_STATE))GetProcAddress(hKernel32,"SetThreadExecutionState"))!=NULL)
- D_SetThreadExecutionState(ES_SYSTEM_REQUIRED|ES_DISPLAY_REQUIRED);
- FreeLibrary(hKernel32);
- }
- }
- else
- {
- hKernel32 = LoadLibrary("kernel32.dll");
- if(hKernel32 != NULL)
- {
- if((D_SetThreadExecutionState=(EXECUTION_STATE (WINAPI *)(EXECUTION_STATE))GetProcAddress(hKernel32,"SetThreadExecutionState"))!=NULL)
- D_SetThreadExecutionState(ES_SYSTEM_REQUIRED|ES_DISPLAY_REQUIRED|ES_CONTINUOUS);
- FreeLibrary(hKernel32);
- }
- }
-}
-
+/***************************************************************************
+ ssave.c - description
+ -------------------
+ begin : Sun Mar 08 2009
+ copyright : (C) 1999-2009 by Pete Bernert
+ web : www.pbernert.com
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. See also the license.txt file for *
+ * additional informations. *
+ * *
+ ***************************************************************************/
+
+//*************************************************************************//
+// History of changes:
+//
+// 2009/03/08 - Pete
+// - generic cleanup for the Peops release
+//
+//*************************************************************************//
+
+#include "stdafx.h"
+
+#include "externals.h"
+
+////////////////////////////////////////////////////////////////////////
+// screensaver stuff: dynamically load kernel32.dll to avoid export dependeny
+////////////////////////////////////////////////////////////////////////
+
+#ifdef __MINGW32__
+#define EXECUTION_STATE DWORD
+#endif
+
+void EnableScreenSaver(BOOL bEnab)
+{
+ HINSTANCE hKernel32 = NULL;
+ EXECUTION_STATE (WINAPI *D_SetThreadExecutionState)(EXECUTION_STATE esFlags);
+
+ if(bEnab)
+ {
+ hKernel32 = LoadLibrary("kernel32.dll");
+ if(hKernel32 != NULL)
+ {
+ if((D_SetThreadExecutionState=(EXECUTION_STATE (WINAPI *)(EXECUTION_STATE))GetProcAddress(hKernel32,"SetThreadExecutionState"))!=NULL)
+ D_SetThreadExecutionState(ES_SYSTEM_REQUIRED|ES_DISPLAY_REQUIRED);
+ FreeLibrary(hKernel32);
+ }
+ }
+ else
+ {
+ hKernel32 = LoadLibrary("kernel32.dll");
+ if(hKernel32 != NULL)
+ {
+ if((D_SetThreadExecutionState=(EXECUTION_STATE (WINAPI *)(EXECUTION_STATE))GetProcAddress(hKernel32,"SetThreadExecutionState"))!=NULL)
+ D_SetThreadExecutionState(ES_SYSTEM_REQUIRED|ES_DISPLAY_REQUIRED|ES_CONTINUOUS);
+ FreeLibrary(hKernel32);
+ }
+ }
+}
+
diff --git a/win32/plugins/peopsxgl/winsrc/ssave.h b/win32/plugins/peopsxgl/winsrc/ssave.h
index 66ac0854..e498c960 100644..100755
--- a/win32/plugins/peopsxgl/winsrc/ssave.h
+++ b/win32/plugins/peopsxgl/winsrc/ssave.h
@@ -1,29 +1,29 @@
-/***************************************************************************
- ssave.h - description
- -------------------
- begin : Sun Mar 08 2009
- copyright : (C) 1999-2009 by Pete Bernert
- web : www.pbernert.com
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. See also the license.txt file for *
- * additional informations. *
- * *
- ***************************************************************************/
-
-//*************************************************************************//
-// History of changes:
-//
-// 2009/03/08 - Pete
-// - generic cleanup for the Peops release
-//
-//*************************************************************************//
-
-// prototype
-
+/***************************************************************************
+ ssave.h - description
+ -------------------
+ begin : Sun Mar 08 2009
+ copyright : (C) 1999-2009 by Pete Bernert
+ web : www.pbernert.com
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. See also the license.txt file for *
+ * additional informations. *
+ * *
+ ***************************************************************************/
+
+//*************************************************************************//
+// History of changes:
+//
+// 2009/03/08 - Pete
+// - generic cleanup for the Peops release
+//
+//*************************************************************************//
+
+// prototype
+
void EnableScreenSaver(BOOL bEnab); \ No newline at end of file
diff --git a/win32/plugins/peopsxgl/winsrc/winmain.c b/win32/plugins/peopsxgl/winsrc/winmain.c
index e69fe6e3..6b860505 100644..100755
--- a/win32/plugins/peopsxgl/winsrc/winmain.c
+++ b/win32/plugins/peopsxgl/winsrc/winmain.c
@@ -1,42 +1,42 @@
-/***************************************************************************
- gpuPeopsOpenGL.c - description
- -------------------
- begin : Sun Mar 08 2009
- copyright : (C) 1999-2009 by Pete Bernert
- web : www.pbernert.com
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. See also the license.txt file for *
- * additional informations. *
- * *
- ***************************************************************************/
-
-//*************************************************************************//
-// History of changes:
-//
-// 2009/03/08 - Pete
-// - generic cleanup for the Peops release
-//
-//*************************************************************************//
-
-#include "stdafx.h"
-
-///////////////////////////////////////////////////////////////////////////
-// GENERIC FUNCS //////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////
-
-HINSTANCE hInst=NULL;
-
-BOOL APIENTRY DllMain(HANDLE hModule, // DLL INIT
- DWORD dwReason,
- LPVOID lpReserved)
-{
- hInst=(HINSTANCE)hModule;
- return TRUE; // very quick :)
-}
-
+/***************************************************************************
+ gpuPeopsOpenGL.c - description
+ -------------------
+ begin : Sun Mar 08 2009
+ copyright : (C) 1999-2009 by Pete Bernert
+ web : www.pbernert.com
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. See also the license.txt file for *
+ * additional informations. *
+ * *
+ ***************************************************************************/
+
+//*************************************************************************//
+// History of changes:
+//
+// 2009/03/08 - Pete
+// - generic cleanup for the Peops release
+//
+//*************************************************************************//
+
+#include "stdafx.h"
+
+///////////////////////////////////////////////////////////////////////////
+// GENERIC FUNCS //////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////
+
+HINSTANCE hInst=NULL;
+
+BOOL APIENTRY DllMain(HANDLE hModule, // DLL INIT
+ DWORD dwReason,
+ LPVOID lpReserved)
+{
+ hInst=(HINSTANCE)hModule;
+ return TRUE; // very quick :)
+}
+