1
0
mirror of https://github.com/DxWnd/DxWnd.reloaded synced 2024-12-30 09:25:35 +01:00

v2_02_90_src

Former-commit-id: 1ddcf7c0518dcba5a3d33ab8e33bdb922e522770
This commit is contained in:
gho tik 2014-08-29 12:39:42 -04:00 committed by Refael ACkermann
parent f401ae8f91
commit 86b492681c
64 changed files with 1276 additions and 633 deletions

View File

@ -149,6 +149,7 @@
// fifth flags DWORD dxw.dwFlags5:
#define DIABLOTWEAK 0x00000001 // ... ??? ...
#define CLEARTARGET 0x00000002 // forces a D3D clean on target surface upon each BeginScene invocation
#define NOWINPOSCHANGES 0x00000004 // suppress WM_WINDOWPOSCHANGING/CHANGED messages (RollerCoaster Tycoon...)
// logging Tflags DWORD:
#define OUTTRACE 0x00000001 // enables tracing to dxwnd.log in general

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6a702163f053b41ba59f0fe20652f8f6a29ae53f4d15cdd3cce41e4a98116aca
oid sha256:f36243fc0a79cc06da0eabc3ad0dbbba323cab01cc95b70fa540816916dea6b1
size 132096

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3997d0254b83f70e4dd1ae372d7c5aefb6d6aeb5b6345651fca1dd1fa166b015
oid sha256:9f047139ee7bc1d209f9b2599241fe377c89f9989073e992d65e02f4bb9d5494
size 137216

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2b27f7aa0eaa1fe4770e14f916970df79b1885df82aef47f260b00527074d10a
oid sha256:1baec6b508045a54e6151d95ca9ff4ffdeaecb2ea1343cf9991fbbeb29ab32a8
size 138240

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2101f8e9ed4cdb9fa8edbb3c3b5062faab55a7f51a1e27a2269ca0852f506f58
size 503296
oid sha256:8e1df66d52d976424de5364bad0b810090c3affd24cc462adbbeef4040b248dd
size 505344

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:79e9b0ed736620751f6a8788cba0d30c929abf45772b782f8fa6ccfdb6fa173c
oid sha256:11ae95eda684d03d69c0855221d6b75795eae8bbc8e2384b0519880904198162
size 557568

View File

@ -1,413 +1,6 @@
[target]
title0=Total Soccer 2000 (DirectX)
path0=D:\Games\ts2000 demo\SOCCERDX.EXE
launchpath0=
module0=
opengllib0=
ver0=1
coord0=0
flag0=134234784
flagg0=-937361152
flagh0=20
flagi0=4456588
flagj0=0
tflag0=6147
initx0=0
inity0=0
minx0=0
miny0=0
maxx0=0
maxy0=0
posx0=50
posy0=50
sizx0=800
sizy0=600
maxfps0=0
initts0=2
winver0=0
maxres0=-1
title1=NHL 99
path1=D:\Games\NHL_99\nhl99.exe
launchpath1=
module1=
opengllib1=
ver1=0
coord1=0
flag1=134234147
flagg1=1207959824
flagh1=20
flagi1=138413060
flagj1=1
tflag1=0
initx1=0
inity1=0
minx1=0
miny1=0
maxx1=0
maxy1=0
posx1=50
posy1=50
sizx1=800
sizy1=600
maxfps1=0
initts1=0
winver1=0
maxres1=-1
title2=Diablo demo MP
path2=D:\Games\Diablo Demo MP\diablo_s.exe
launchpath2=
module2=
opengllib2=
ver2=0
coord2=0
flag2=134217762
flagg2=1210138624
flagh2=20
flagi2=138544132
flagj2=1
tflag2=6403
initx2=0
inity2=0
minx2=0
miny2=0
maxx2=0
maxy2=0
posx2=50
posy2=50
sizx2=800
sizy2=600
maxfps2=0
initts2=0
winver2=0
maxres2=-1
title3=DUCKMAN.EXE
path3=D:\Games\duckman\DUCKMAN.EXE
launchpath3=
module3=
opengllib3=
ver3=0
coord3=0
flag3=134217762
flagg3=1207959568
flagh3=20
flagi3=138413060
flagj3=0
tflag3=0
initx3=0
inity3=0
minx3=0
miny3=0
maxx3=0
maxy3=0
posx3=50
posy3=50
sizx3=800
sizy3=600
maxfps3=0
initts3=0
winver3=0
maxres3=-1
title4=Rune War
path4=D:\Games\RuneWar\RUNEWAR.EXE
launchpath4=
module4=
opengllib4=
ver4=0
coord4=0
flag4=134218272
flagg4=1207959552
flagh4=20
flagi4=134217732
flagj4=0
tflag4=0
initx4=0
inity4=0
minx4=0
miny4=0
maxx4=0
maxy4=0
posx4=50
posy4=50
sizx4=800
sizy4=600
maxfps4=0
initts4=0
winver4=0
maxres4=-1
title5=Rapanui
path5=D:\Games\Rapanui\Rapanui.exe
launchpath5=
module5=
opengllib5=
ver5=0
coord5=0
flag5=134218272
flagg5=1207959552
flagh5=20
flagi5=138412036
flagj5=0
tflag5=0
initx5=0
inity5=0
minx5=0
miny5=0
maxx5=0
maxy5=0
posx5=50
posy5=50
sizx5=800
sizy5=600
maxfps5=0
initts5=0
winver5=0
maxres5=-1
title6=Recoil
path6=D:\Games\Recoil\Recoil.exe
launchpath6=
module6=
opengllib6=
ver6=0
coord6=0
flag6=153092256
flagg6=136314880
flagh6=20
flagi6=138412036
flagj6=0
tflag6=6147
initx6=0
inity6=0
minx6=0
miny6=0
maxx6=0
maxy6=0
posx6=50
posy6=50
sizx6=800
sizy6=600
maxfps6=0
initts6=0
winver6=0
maxres6=-1
title7=Pax Corpus
path7=D:\Games\Pax Corpus\Pax.exe
launchpath7=
module7=
opengllib7=
ver7=0
coord7=0
flag7=673185826
flagg7=1277247488
flagh7=20
flagi7=138413068
flagj7=0
tflag7=6403
initx7=0
inity7=0
minx7=0
miny7=0
maxx7=0
maxy7=0
posx7=50
posy7=50
sizx7=800
sizy7=600
maxfps7=0
initts7=0
winver7=0
maxres7=-1
title8=POD Gold (D3D)
path8=E:\PODD3DX.EXE
launchpath8=
module8=
opengllib8=
ver8=0
coord8=0
flag8=134217760
flagg8=1744830592
flagh8=20
flagi8=138543108
flagj8=0
tflag8=0
initx8=0
inity8=0
minx8=0
miny8=0
maxx8=0
maxy8=0
posx8=50
posy8=50
sizx8=800
sizy8=600
maxfps8=0
initts8=0
winver8=0
maxres8=-1
title9=Fifth Element, the
path9=D:\Games\fifthelement\PC.EXE
launchpath9=
module9=
opengllib9=
ver9=0
coord9=0
flag9=134217826
flagg9=1212153984
flagh9=4
flagi9=136314884
flagj9=0
tflag9=6147
initx9=0
inity9=0
minx9=0
miny9=0
maxx9=0
maxy9=0
posx9=50
posy9=50
sizx9=800
sizy9=600
maxfps9=0
initts9=0
winver9=0
maxres9=-1
title10=Outcast
path10=D:\Games\Outcast\oc\Oc3.exe
launchpath10=D:\Games\Outcast\oc\loader.exe
module10=
opengllib10=
ver10=0
coord10=0
flag10=153092128
flagg10=1209008128
flagh10=20
flagi10=205520900
flagj10=0
tflag10=0
initx10=0
inity10=0
minx10=0
miny10=0
maxx10=0
maxy10=0
posx10=50
posy10=50
sizx10=800
sizy10=600
maxfps10=0
initts10=0
winver10=0
maxres10=-1
title11=Wind Fantasy SP demo
path11=D:\Games\Wind Fantasy SP demo\WF_SP.exe
launchpath11=
module11=
opengllib11=
ver11=0
coord11=0
flag11=134217762
flagg11=1210056704
flagh11=20
flagi11=138413060
flagj11=0
tflag11=0
initx11=0
inity11=0
minx11=0
miny11=0
maxx11=0
maxy11=0
posx11=50
posy11=50
sizx11=800
sizy11=600
maxfps11=0
initts11=0
winver11=0
maxres11=-1
title12=Freedom Force vs the 3rd Reich
path12=D:\Games\Freedom Force vs the 3rd Reich\ffvt3r.exe
launchpath12=
module12=
opengllib12=
ver12=0
coord12=0
flag12=134218272
flagg12=1207959552
flagh12=20
flagi12=138412036
flagj12=0
tflag12=0
initx12=0
inity12=0
minx12=0
miny12=0
maxx12=0
maxy12=0
posx12=50
posy12=50
sizx12=800
sizy12=600
maxfps12=0
initts12=0
winver12=0
maxres12=-1
title13=crimson.exe
path13=D:\Games\Crimson Skies\crimson.exe
launchpath13=
module13=
opengllib13=
ver13=0
coord13=0
flag13=134217760
flagg13=1207959552
flagh13=20
flagi13=138412036
flagj13=0
tflag13=6403
initx13=0
inity13=0
minx13=0
miny13=0
maxx13=0
maxy13=0
posx13=50
posy13=50
sizx13=800
sizy13=600
maxfps13=0
initts13=0
winver13=0
maxres13=-1
title14=Zoo Tycoon
path14=D:\Games\Zoo Tycoon\zoo.exe
launchpath14=
module14=
opengllib14=
ver14=0
coord14=0
flag14=134218272
flagg14=1207959552
flagh14=20
flagi14=134217732
flagj14=0
tflag14=0
initx14=0
inity14=0
minx14=0
miny14=0
maxx14=0
maxy14=0
posx14=50
posy14=50
sizx14=800
sizy14=600
maxfps14=0
initts14=0
winver14=0
maxres14=-1
[window]
posx=1011
posy=455
sizx=468
sizy=278
lang=default
posx=50
posy=50
sizx=320
sizy=200
lang=automatic

28
build/exports/Lander.dxw Normal file
View File

@ -0,0 +1,28 @@
[target]
title0=Lander
path0=D:\Games\Lander\lndrd3dr\lander.EXE
launchpath0=
module0=
opengllib0=
ver0=0
coord0=0
flag0=956317728
flagg0=1207959552
flagh0=20
flagi0=136314884
flagj0=0
tflag0=0
initx0=0
inity0=0
minx0=0
miny0=0
maxx0=0
maxy0=0
posx0=50
posy0=50
sizx0=800
sizy0=600
maxfps0=0
initts0=0
winver0=0
maxres0=-1

View File

@ -0,0 +1,28 @@
[target]
title0=Last Half od Darkness
path0=G:\LastHalfWin.exe
launchpath0=
module0=
opengllib0=
ver0=0
coord0=0
flag0=134234656
flagg0=1207959552
flagh0=20
flagi0=138412036
flagj0=0
tflag0=0
initx0=0
inity0=0
minx0=0
miny0=0
maxx0=0
maxy0=0
posx0=50
posy0=50
sizx0=800
sizy0=600
maxfps0=0
initts0=0
winver0=0
maxres0=-1

View File

@ -0,0 +1,28 @@
[target]
title0=Mall Tycoon
path0=D:\Games\Mall.Tycoon\mall.exe
launchpath0=
module0=
opengllib0=
ver0=0
coord0=0
flag0=150994976
flagg0=1207959552
flagh0=20
flagi0=138412036
flagj0=0
tflag0=0
initx0=0
inity0=0
minx0=0
miny0=0
maxx0=0
maxy0=0
posx0=50
posy0=50
sizx0=800
sizy0=600
maxfps0=0
initts0=0
winver0=0
maxres0=-1

28
build/exports/Postal.dxw Normal file
View File

@ -0,0 +1,28 @@
[target]
title0=Postal
path0=D:\Games\Postal\POSTAL.EXE
launchpath0=
module0=
opengllib0=
ver0=1
coord0=3
flag0=536887330
flagg0=1249902592
flagh0=2097168
flagi0=138413060
flagj0=4
tflag0=0
initx0=0
inity0=0
minx0=0
miny0=0
maxx0=0
maxy0=0
posx0=50
posy0=50
sizx0=800
sizy0=600
maxfps0=0
initts0=0
winver0=0
maxres0=-1

View File

@ -0,0 +1,28 @@
[target]
title0=Prison Tycoon
path0=D:\Games\Prison.Tycoon\Prison Tycoon.exe
launchpath0=
module0=
opengllib0=
ver0=9
coord0=0
flag0=134234656
flagg0=1207959808
flagh0=48
flagi0=138412036
flagj0=0
tflag0=0
initx0=0
inity0=0
minx0=0
miny0=0
maxx0=0
maxy0=0
posx0=50
posy0=50
sizx0=800
sizy0=600
maxfps0=0
initts0=0
winver0=0
maxres0=-1

View File

@ -0,0 +1,28 @@
[target]
title0=RollerCoaster Tycoon 2
path0=D:\Games\Rollercoaster Tycoon 2\Rct2.exe
launchpath0=
module0=
opengllib0=
ver0=0
coord0=0
flag0=671089184
flagg0=1207959552
flagh0=20
flagi0=138412036
flagj0=0
tflag0=0
initx0=0
inity0=0
minx0=0
miny0=0
maxx0=0
maxy0=0
posx0=50
posy0=50
sizx0=800
sizy0=600
maxfps0=0
initts0=0
winver0=0
maxres0=-1

View File

@ -0,0 +1,28 @@
[target]
title0=RollerCoaster Tycoon 3
path0=D:\Games\RollerCoaster Tycoon 3\RCT3.exe
launchpath0=
module0=
opengllib0=
ver0=0
coord0=0
flag0=671089184
flagg0=1207959552
flagh0=20
flagi0=138412036
flagj0=0
tflag0=0
initx0=0
inity0=0
minx0=0
miny0=0
maxx0=0
maxy0=0
posx0=50
posy0=50
sizx0=800
sizy0=600
maxfps0=0
initts0=0
winver0=0
maxres0=-1

View File

@ -0,0 +1,28 @@
[target]
title0=RollerCoaster Tycoon Deluxe
path0=D:\Games\rollercoaster tycoon deluxe\rct.exe
launchpath0=
module0=
opengllib0=
ver0=1
coord0=0
flag0=671088674
flagg0=1241514000
flagh0=65552
flagi0=138413060
flagj0=4
tflag0=0
initx0=0
inity0=0
minx0=0
miny0=0
maxx0=0
maxy0=0
posx0=50
posy0=50
sizx0=640
sizy0=480
maxfps0=0
initts0=0
winver0=0
maxres0=-1

View File

@ -0,0 +1,28 @@
[target]
title0=RollerCoaster Tycoon
path0=D:\Games\rollercoaster tycoon\rct.exe
launchpath0=
module0=
opengllib0=
ver0=1
coord0=0
flag0=671088674
flagg0=1207959552
flagh0=2097172
flagi0=138412036
flagj0=0
tflag0=0
initx0=0
inity0=0
minx0=0
miny0=0
maxx0=0
maxy0=0
posx0=50
posy0=50
sizx0=800
sizy0=600
maxfps0=0
initts0=0
winver0=0
maxres0=-1

View File

@ -0,0 +1,28 @@
[target]
title0=Tarzan Action Game
path0=D:\Games\TARZAN\tarzan.exe
launchpath0=
module0=
opengllib0=
ver0=0
coord0=0
flag0=671219747
flagg0=1207959552
flagh0=20
flagi0=138413060
flagj0=0
tflag0=0
initx0=0
inity0=0
minx0=0
miny0=0
maxx0=0
maxy0=0
posx0=50
posy0=50
sizx0=800
sizy0=600
maxfps0=0
initts0=0
winver0=0
maxres0=-1

View File

@ -0,0 +1,28 @@
[target]
title0=X - Beyond the Frontier (dx6)
path0=D:\Games\X - Beyond the Frontier\Xdx6.exe
launchpath0=
module0=
opengllib0=
ver0=0
coord0=0
flag0=150994976
flagg0=1207959552
flagh0=20
flagi0=134217732
flagj0=0
tflag0=0
initx0=0
inity0=0
minx0=0
miny0=0
maxx0=0
maxy0=0
posx0=50
posy0=50
sizx0=800
sizy0=600
maxfps0=0
initts0=0
winver0=0
maxres0=-1

View File

@ -0,0 +1,28 @@
[target]
title0=X - Beyond the Frontier
path0=D:\Games\X - Beyond the Frontier\X.exe
launchpath0=
module0=
opengllib0=
ver0=0
coord0=0
flag0=150994976
flagg0=1207959552
flagh0=20
flagi0=138412036
flagj0=0
tflag0=0
initx0=0
inity0=0
minx0=0
miny0=0
maxx0=0
maxy0=0
posx0=50
posy0=50
sizx0=800
sizy0=600
maxfps0=0
initts0=0
winver0=0
maxres0=-1

View File

@ -0,0 +1,28 @@
[target]
title0=Zanzarah The Hidden Portal
path0=D:\Games\Zanzarah The Hidden Portal\System\zanthp.exe
launchpath0=D:\Games\Zanzarah The Hidden Portal\System\Zanzarah.exe
module0=
opengllib0=
ver0=0
coord0=0
flag0=134217760
flagg0=1207959552
flagh0=20
flagi0=138412036
flagj0=0
tflag0=0
initx0=0
inity0=0
minx0=0
miny0=0
maxx0=0
maxy0=0
posx0=50
posy0=50
sizx0=800
sizy0=600
maxfps0=0
initts0=0
winver0=0
maxres0=-1

View File

@ -0,0 +1,28 @@
[target]
title0=Zulu Assault
path0=D:\Games\Zulu Assault\ASSAULT.EXE
launchpath0=
module0=
opengllib0=
ver0=0
coord0=0
flag0=134218272
flagg0=1207959552
flagh0=20
flagi0=138412036
flagj0=0
tflag0=0
initx0=0
inity0=0
minx0=0
miny0=0
maxx0=0
maxy0=0
posx0=50
posy0=50
sizx0=800
sizy0=600
maxfps0=0
initts0=0
winver0=0
maxres0=-1

View File

@ -0,0 +1,595 @@
v2.2.00/01
major code rewriting - introduced dxwCore class
preliminary FPS handling: Limit, Skip & Count with configurable delay
Hide Multi Monitor configuration flag - used for "Dream Acquarium" on multimonitor PC.
v2.2.02
preliminary time stretching: so far applies to GetTickCount() only, and is controlled by Alt-F5 / F6 keys.
Fixed bug in GDI BitBlt call: stretching must be made on screen DC only, or it's made twice.
v2.02.03/04:
code cleanup - see syslib calls hooking
new configuration flags: Hook GDI and Hook OpenGL
OpenGL custom library field
API hooking fix with module specification
Time stretching by keyboard control (Alt F5/F6) and/or Time Slider dialog
v2.02.05:
hooked winmm timeGetTime() API: makes time stretching work for Age of Empires series
changed time stretching grain: now it's not the coarse grained 2x, 4x,... series in 9 possible values but the fine grained series 1.5x, 2x, 3x,.... in 17 possible values
added status and time stretching view panels to tray icon menu
v2.02.06:
preliminary FPS counter overlapped on game screen, Alt-F7 to toggle display on/off.
fixed buf on time stretch logging (and possible game crash).
revised GetDC handling with 8BPP paletized surfaces: avoided need to emulate reverse-blitting and got an impressive speed improvement for games such as Age of Empires I & II and Hyperblade.
v2.02.07:
many fixes on the FPS and time control features.
v2.02.08:
fixed some errors in the main directdraw palette descriptor. That gives better compatibility and less complicated source code.
added Fake Version feature: now Dungeon Keeper II (original version, not GOG hack) can detect a fake Win2000 / WinXP environment on Win7 and newer. Tested and working on Win7. Many thanks to Maxim for pushing me hard to win my lazyness and implement this new feature.
v2.02.09:
Fixed some x,y window coordinates bugs
Fixed some proxy log messages (missing \n line terminator)
Fixed Trace "DirectX" flag.
improved GetDC handling in 8BPP palette mode: AddPalette called on demand, and on any surface (including backbuffers): makes Emergency work with no "Handle DC" flag set. Beware: this may affect the "Map GDI HDC on Primary DC" flag causing surface locks.
Fixed limit FPS timing issues: now the max possible FPS is 1000/delay.
Fixed EndPaint bug causing HDC lock in "Map GDI HDC to Primary DC" mode.
v2.02.10:
Added "Full RECT Blit" mode: may be useful to handle problematic situations (e.g. "Urban Assault" intro movies)
Fixed ClientToScreen and ScreenToClient hookers to properly handle scaled windows. This makes "Postal" working.
Fixed global palette reference count (??) in DirectDraw::Release hook
Fixed Window messages handling for SWP_NOMOVE, SWP_NOSIZE modes.
v2.02.11:
Added debug messages for GetSystemMetrics() modes, MapWindowPoints() points, DirectDrawEnumerate/Ex() devices.
ompiled with #define _WIN32_WINNT 0x0600 -> handles Vista modes
Added NOPALETTEUPDATE ("Palette update don't Blit" flag) to eliminate flickering when ddraw and GDI methods conflict
Hooked all LoadLibraryA/W and LoadLibraryExA/W calls
Hooked
extDirectDrawEnumerate/Ex ddraw calls to handle Hide multi-monitor option.
Detected directshow activation through CoCreateInstance and hooked quartz.dll segment: now Urban Assault movies don't require "Full RECT Blit" option to be set.
Updated DDSurface::Release hook
v2.02.12
GUI: Tabbed setup panel. More space for more future options.
DLL: (optional) splash screen
probably, some regression bugs....
v2.02.13
Added decoding of WINDOWPOS.flags field in trace log
revised whole hooking procedures to use HMODULE handle instead of module name
Added WM_GETMINMAXINFO and WM_NCCALCSIZE handling in WinProcess hook
Attempt to handle double buffering through surface attach to backbuffer (???)
Fixed CHILD window positioning for BIG windows in CreateWindowExA hook
Added GlobalMemoryStatus hook to fix huge values when value exceeds DWORD range. Fixes Nocturne intro warning message.
V2.02.14
Started dll injection to handle startup code
Fixed directx CreateSurface hook to fix "Wargames" error in emulated mode
Fixed directx SetClipper hook to properly handle backbuffer clipping and fix "Wargames" clipping problems
v2.02.15
Fixed clipping handling of primary/backbuffer surfaces
Added option to set AERO compatibility for Vista/Win7/Win8 platforms. Need to call a undocumented ddraw API. Thanks to Vovchik that discovered it. Use at your own risk!
v2.02.16
DLL injection finally working! Quake 2 is supported.
Added Wireframe option for OpenGL games
Improved fix for clipper handling of primary/backbuffer surfaces
v2.02.18
Improved LoadLibrary family hook and other improvements to let DxWnd better retrieve OpenGL libs: now Homeworld 2 is working
Fixed a bug in backbuffer ZBUFFER attach emulation. Now Dungeon Keeper 2 crashes no more.
Moved "Remap client rect" option from directx tab to main program tab
Added the "Force Hook" in the OpenGL tab. Useless for now.
Preliminary work for d3d10/d3d11 wrapping. Unfinished and not working so far.
Added LoadLibraryEx flags explaination in log
Added support for mouse X,Y coordinates display in status window
OpenGL hooking: fixed bug to prevent hooking same call twice
OpenGL hooking: added hook for wglMakeCurrent call to keep track of rendered window
OpenGL hooking: fixed glViewport and extglScissor hook coordinates handling
D3D hooking: Added Wireframe option for D3D games
Added hooking of CLSID_DxDiagProvider through CoCreateInstance
Fixed (further simplified) clipping handling of primary/backbuffer surfaces
ChangeDisplaySettings hook: fixed x,y coordinate inversion in log message
v2.02.19
Saves GUI coordinates
Fixed "Remap client rect" option for Diablo's windows and Premier Manager 98 mouse movements
Added "Highlight blit to primary" option to draw a yellow bounding box around blits to primary surface
Fixed some exception conditions when closing the programs
Fixed CreateSurface handling to allow Premier Manager 98 start in emulated mode
Fixed ONEPIXELFIX handling
Fixed BIG WIN handling for Diablo's windows
Fixed FillRect hook to prevent filling outside virtual desktop
Disabled hooking of system libraries
Fixed a nasty bug that caused your desktop to freeze until shutdown !!!
Fixed GetWindowRect handling for windows not created by the task: Diablo queries the explorer window size! Now the retrieved RECT can't be larger than the virtual desktop
v2.02.20
Fixed an error in D3D10/11 preliminary code: AoE III working again
Added "Hook all DLLs" option to simplify congiguration: see new Diablo setup
Added screen coordinates to log
Some code rearrangement
v2.02.21
it's a w.i.p. release, wait 'till finished....
v2.02.22
Major code rearrangement in API hooking. Expect some troubles...
Added desktop workarea and centered coordinate settings
Fixed imelib hooking
Added HOOKENABLED flag
Fixed ChangeDisplaySettings
GUI: added ListView icons
GUI: added pause command
GUI: updated commands layout
v2.02.23/24
Fixed "disable setting gamma ramp" flag to intercept both GDI and D3D calls
Fixed client workarea setting to occupy the whole client area even when preserving aspect ratio (it draws black rectangles to the left/right or top/bottom side)
Added DisableThreadLibraryCalls optimization
Added B&W screen simulation (for primary emulation only)
Improved the primary emulation capacity to handle 3D games
Added the "preserve surface capabilities" flag
Fixed an hooking bug for user32.dll
v2.02.25
CORE:
Added 'Single CPU Process Affinity' flag to let old games run on a single CPU core.
Fixed bug causing possible crash using 'preserve surface caps' flag
Switched lpDDSBack reference when backbuffer is upgraded through QueryInterface
Eliminated lpDDSBack clearing when refcount is zero - why is this working better? Needs further investigation
Added DDSCAPS_3DDEVICE capability when in EMULATED mode
GUI:
Added Kill process by name functionality (right click menu on program's list)
Fixed GUI initial position: now checks for desktop size to fit GUI within visible borders
Added single cpu process affinity checkbox in compatibility tab
v2.02.26
CORE:
Fixed Black&White mode for 16BPP color depth
Revised hooking code, now more compact and clear....
Fixed DxWnd splash screen, for those who love it
Increased child win table - now 688 hunter killer works perfectly
GUI:
Added /debug flag to enable debugging options
Revised hooking code, now more compact and clear....
Restored Hook child win option
v2.02.27
CORE:
fixed GetDC/ReleaseDC ddraw implementation to refresh GDI operation on primary surface. Warlords 3 text is now visible.
preliminary implementation of MapWindowPoints - to be tested
GUI:
Fixed log flags wrong initialization
v2.02.28
CORE:
eliminated experimental ICSendMessage and ICOpen hooks, preventing some games (Alien Nations) to work
added mciSendCommand hook to fix video playback
fixed MoveWindow bug - still, it's unknown the reason why some programs (Emergency) tries to MoveWindow upon the hWnd=0 desktop!
fixed MapWindowPoints hook (Alien Nations)
fixed desktop detections in some places, now correctly using dxw.IsDesktop() method
Now "Alien Nations" and "Emergency" working (almost) perfectly.
fixed d3d8/9 hook to Get/SetGammaRamp. This should make a great number of recent games playable again.
v2.02.29
CORE:
hooked DirectDrawSurface::Lock method to center primary surface memory updates centered into the window (in no emulated mode)
v2.02.30
CORE:
Some ddraw::GetDC log message fixes
added preliminary registry emulation - tested ok with "duckman"
added separate flag for preliminary registry operation trace
added CDROM drive type emulation - tested ok with "Fighting Forces" RIP
fixed FixCursorPos routine: cursor x,y compensation must always use pseudo-fullscreen window parameters - fixes Imperialism II mouse problems
fixed Desktop Workarea position mode for ddraw games
added CoCreateInstanceEx hook - "Final Fighter" seems to be using it, but who knows why...?
added "Don't move D3D Rendering Window" window option to make "Fable Lost Chapters" working
GUI:
updated default values on new entry creation to map most-likely-to-work parameters
v2.02.31
CORE:
disabled annoying compilation security warnings
improved advapi32.dll hooking and logging
handling of complex primary surfaces with backbuffer surface inherited from one directdraw session to the following and with different interfaces
fixed SetCooperativeLevel handling in case of WINDOWED mode against desktop hwnd==NULL
fixed GetGDISurface in EMULATED mode
hooked gdi32 API set for Imperialism I & II and 688 Hunter Killer:GetClipBox, Polyline, PolyBezierTo, PolylineTo, PolyDraw, MoveToEx, ArcTo, LineTo, StretchDIBits, SetDIBitsToDevice, SetPixel, Ellipse, Polygon, Arc, CreateEllipticRgn, CreateEllipticRgnIndirect, CreateRectRgn, CreateRectRgnIndirect, CreatePolygonRgn, DrawTextA, DrawTextExA.
fixed gdi32.dll hooking for TextOutA, TabbedTextOutA, Rectangle, BitBlt, PatBlt, StretchBlt, CreateFont, CreateFontIndirect
improved ddraw proxy logging
added / fixed user32.dll API FrameRect, TabbedTextOutA, CloseWindow, DestroyWindow, SendMessageW
opengl: fixed glCreateContext, wglMakeCurrent to make Descent III playable in opengl video mode.
fixed DeferWindowPos hook to make Imperialism II working
fixed SM_CXVIRTUALSCREEN, SM_CYVIRTUALSCREEN properties
fixed window class logging causing program crash
GUI:
added "GDI/Scale font parameters" & "DirectX/Disable HAL support" options
v2.02.32
CORE:
added new GDI handling mode, "Emulated devce context". Currently tested successfully on "G-Nome" only.
fixed "Prevent maximize" windows handling avoiding to disable topmost style for child windows
fixed handling of DDSCAPS_3DDEVICE surfaces in emulated mode: "Nightmare Ned" is working ok, "The Sims" works better (still crashing..)
fixed banner handling in case of device context remmapped coordinates
fixed memory leakage in SetDIBitsToDevice hooker
GUI
added radiobutton group to set the preferred GDI emulation mode
v2.02.33
CORE:
experimental attempt to emulate the ZBUFFER attach to the BACKBUFFER surface
improved log to detail all ddraw object properties
experimental emulation of RGB to YUV conversion to investigate "duckman" problems on Win7
improved grayscale algorythm
fixed missing DDPF_ALPHAPIXELS property causing several blit incompabilities
fixed surface handling for "Submarine Titans"
fixed mousewheel handling
fixed hooking bug causing several problems (i.e. Age of Empires III)
Added FULLSCREENONLY option: fixes "Submarine Titans" intro movies
Added "Bypass font unsupported api" compatibility flag: makes "Stratego" working
fixed several d3d8/9 hooking problems
GUI
added controls for new core features
defaulted ddraw emulation mode to surface emulation
v2.02.34
CORE:
Much better surface description in log
Completely revised CreateSurface hook: emulated and direct code are merged as much as possible, and reference counter are kept accurate. Now most games can work both in emulated and direct mode.
Fixed surface capabilities for "Vangers", "The Sims" (now working in emulated mode again)
Updated "Fixed aspect ratio" option: now uses the x,y size declared in the configuration instead of the fixed 800 x 600 standard one.
Added virtual fullscreen "Desktop" mode.
Completely revised the Peek/GetMessage handling: now it uses the standard SetWindowHook API instead of the address redirection, making the handling more reliable and accurate: now "Age of Empires III" works at last!
GUI:
Added virtual fullscreen "Desktop" mode.
Added "Fix buffered IO after Win98" flag: this is meant to fix an incompatibility in the ReadFile kernel32 API that must read from block boundaries, where a block was smaller up to Win98 and bigger after it.
As a result, games like "Dylan Dog Horror Luna Park" show IO errors while reading data from the CD. Unfortunately, this is not the only problem of this game, so Dylan Dog fans will have to wait further.
Maybe some other programs suffer of this problem, and I will strongly appreciate if anyone finds some.
v2.02.35
fixed BACKBUFFER surface attributes in direct (not emulated) mode: Rayman 2 playable again
added FILTERMESSAGES flag ("filter offending messages") to eliminate some problems to games not developed to work windowized (Rayman 2, Mirror's Edge ...)
fixed bug crashing the program when "keep aspect ratio" is selected with window size set to 0
v2.02.36
hooked GetAttachedSurface to non-PRIMARY surface to track ZBUFFER attach to BACKBUFFER. Useless, so far...
revised capability handling in CreateSurface
hook trace is now activated from a separate log flag to reduce debug log size
added "Peek all messages in queue" to avoid queue saturation and automatic task kill in Win7 (thank to P K help)
fixed message handling in the case messages are passed to a routine handle
v2.02.37
code reorganization
GUI:
removed useless flags and moved debug options in a hidden tab
v2.02.38-40
Fixed coordinate calculation for blit operations when keeping aspect ratio.
Fixed window coordinate placement in desktop / client area mode for programs with a visible menu bar.
Changed "Lock win coordinates" flag: now it allows window movement / resizing when driven by mouse input.
Fixed a bug in GDI "Map DC to primary surface"mode.
Added palette display window to GUI
v2.02.41
Added "suppress child process creation"flag. This flag is introduced to manage games such as "Heart of Iron 2" that start intro movie by means of a separate process. HoI2 is starting the binkplay.exe program in the game's avi subfolder. This way you don't get a windowed movie, but completely suppress it.
v2.02.42
added hook to kernel32.dll QueryPerformanceCounter API to enable time stretching to Rayman 2
handled GetAttachedSurface emulation for FLIP capability on primary surface - that makes the intro movies of Empire Earth visible.
Some code cleaning
Cleared invisible debug flags ...
v2.02.43
Several changes for Empire Earth:
fix: restore 16BPP color mode after directdraw session termination
fix: recovered window destruction
fix: proper handling of MIPMAP and LOCALVIDMEM surfaces
fix: color depth handling - now when the program terminates the desktop is brought to the original color depth
v2.02.44
Improved debug logging for all palette operations
fixed a bugged log causing the crash of Empire Earth in debug mode
added show time stretching flag - preliminary version. Some code cleaning as well.
change in automatic screen refresh - should make the "palette update don't blit" flag obsolete.....
added a static definition for the default system palette
added interception for CoCreateInstance following cases:
case 0xe436ebb3: Module="quartz"; Class="CLSID_FilterGraph";
case 0x4fd2a832: Module="ddrawex"; Class="CLSID_DirectDrawEx";
case 0x49c47ce5: Module="amstream"; Class="CLSID_AMMultiMediaStream";
preliminary (proxed) interception for "GetActiveWindow" and "GetForegroundWindow"
v2.02.45
A small fix for ddraw 7 games that makes Praetorians playable, though with some problems!
v2.02.46
Fixed handling of user32 CreateDialogIndirectParam call to avoid processing in non fullscreen mode - fix necessary to start "Crimson Skies".
v2.02.47
GUI:
Configuration tabs reorganization: now some tabs have merged making it easier to reach all options
core:
improved d3d wrapping and sdded ZBUFFER cleanup flags to fix some d3d games. In particular:
Clean ZBUFFER @1.0 fix: to fix "Star Wars Episode I Racer"
Clean ZBUFFER @0.0 fix: to fix "Crimson Skies" black blocks bug on ATI cards
v2.02.48
New options: "Disable fogging", "Textures not power of 2 fix"
A few fix to prevent game crashes
v2.02.49
Separated ddraw, d3d and dxwnd log messages
Hooked GetAvailableVidMem method to limit memory values
Hooked ChangeDisplaySettings call in both versions ANSI and WIDECHAR, to prevent messing up with the screen
Added HookWindowProc() subroutine, called at dxhook.c@1534
Added "Add proxy libs" flag - so far to copy a d3d9.dll proxy lib to fix d3d9 games
Hooked d3d8/9 SetCursorPosition method
Hooked d3d8/9 AddRef / release methods (for logging)
Fixed D3DDevice8/9 hooking
Hooked QueryPerformanceFrequency
Fixed a bug in d3d7 hooking
GUI: added desktop color setting
v2.02.50
Added "Intercept RDTSC" option: so far, tested on Unreal Tournament only.
To implement RDTSC detection, I owe a big thank you to Olly who shared the disasm lib used to browse the assembly code.
v2.02.51/52
Hooked window timers: now "Ed Hunter" can be time stretched
added NOFILLRECT debug option
fixed WM_DISPLAYCHANGE handling (x,y swapped coordinates?)
fixed int64 arithmetic for performance counters
Added (untested !!!) handling for RDTSCP opcode with "Intercept RDTSC" option
Added "Limit screen resolution" option: seems necessary for "Sid Meyer's Civilization III" to work
Improved initial window coordinate & style handling
fixed virtual screen size showing into status panel
hooked SetPixelFormat, GetPixelFormat, ChoosePixelFormat and DescribePixelFormat to redirect desktop hwnd and make wglCreateContext work (needed for Civ III)
fixed log message for TextOut parameters
hooked DisableD3DSpy (invoked by The Bard's Tale)
fixed extglViewport coordinate remapping when invoked with CW_USEDEFAULT values (Civ III)
fixed bug in DirectDarawCreate/Ex hooking with wrong module handle
v2.02.53
Handling of ddraw screen color depth 15BPP - in "Hesperian Wars"
fixed IAT scanning: now function addresses for remapping are searched in possibly multiple instances of dll text segment - in "Aaron Hall's Dungeon Odissey"
hooked SystemParametersInfo call
fixed window size logic to check for window menu bar, considering also the WS_CHILD case.
fixed window move/resize when message processing is enabled: coordinates outside the child area or within ENTER/EXITSIZEMOVE must NOT be altered.
expanded timer processing to include user32 Set/KillTimer - in "Aaron Hall's Dungeon Odissey"
fixed possible recursion while hooking child window procedure identical to parent's one
fixed gdi emulation on top of ddraw surface, enough to play "Sid Meyer's Civilization III".
v2.02.54
fixed a bug in d3d GetAvailableVidMem that was causing too many troubles...
fixed a bug in Suppress IME option
fixed a bug in handled library list, possibly affecting d3d/d3d7 games
avoid fixing window style for non-desktop windows (fixed a Port Royale 2 bug)
eliminated "Disable HAL support", no longer necessary
some incomplete work on gdi game handling
added preliminary, incomplete (not working) glide handling
v2.02.55
added "Hide desktop background" video option
v2.02.56
hooked RegisterClassA API (useless so far...)
fixed bug in SendMessageW hooking: caused truncated text in window titles and form captions
fixed several d3d1-7 hooks: prevented some d3d games to properly work, i.e. "Thief the Dark Project"
fixed d3d GetDisplayMode to return virtual desktop size - fixed "Affari Tuoi", an italian game.
fixed some log messages
v2.02.57
fixed WS_NCCALCSIZE & WM_NCPAINT messages to ensure a proper window's border and size - fixed Black Thorn window problems
fixed "Hide desktop background" flag
v2.02.58
Added Automatic DirectX mode: not workink always, but should make it much easier to guess a proper surface setting.
Automatic mode allows dynamic mode change depending on the situation: it is necessary for Populous 3 D3D version.
fixed BltFast operation with SRC color key (often used to draw cursor from texures) directly to primary surface: this makes the cursor visible in Populous 3.
minor fixes on logging
v2.02.59
fixed IDIrectDraw reference counter for ddraw release 1 session: fixes "Warhammer 40K Rites Of War" first screen
fixed QueryPerformanceCounter handling: fixes "New York Racer" time stretching problems
v2.02.60
fixed time stretching to handle Total Soccer 2000
fixed ZBUFFER surface creation to handle GOG Incoming troubles on some cards
fixed handling of special effects (wireframe, no fogging, zbuffer always) to be valid on all d3d versions
v2.02.61
added directx "Compensate Flip emulation" flag: used primarily to get rid of mouse artifacts due to emulated Flip rpocedure in windowed mode. Fixes Gruntz issues and some other games...
v2.02.62
fixed d3d7 CreateDevice hook and d3d7 rendering options (wireframe, disablefogging, zbufferalways)
fixed doublebuffer emulation - avoid returning the backbuffer when zbuffer is requested. Fixes rendering problems of many games!
v2.02.63
fixed d3d hooking for Reset and GetDirect3D methods: now Jumpgate works at any available resolution, and the "Add proxy libs" option is no longer necessary
fixed "Compensate Flip emulation" option for non emulated surface mode: fixes mouse artifacts for "Rogue Spear Black Thorn"
added preliminary handling for "Disable Textures" option
v2.02.64
GUI: implemented multiple file import
DLL:
fixed a ddraw session reference count error that prevented "Jet Moto" to start
fixed "Compensate Flip emulation" for ddraw7 games: now "Empire Earth" supports this flag.
fixed CloseWindow hook: now games that minimize/restore the main window on task switch can possibly recover (e.g. Hundred Swords)
fixed process hook: now it should be a little more robust and efficient. Hopefully should fix some Macromedia Flash problems.
fixed IDDrawSurface::Lock() prototype. Not gameplay improvements, though...
added DirectX "Return 0 ref counter" option as quick & dirty solution to many reference counter problems!
fixed DirectDrawCreateEx failing to register the main ddraw session handle
fixed palette problem in emulated mode: palette must be applied to backbuffer surface as well. Now "Duckman" and "Total Soccer 2000" show perfect colors.
v2.02.65
added "Fine time adjust" flag to finely set timeslider by 10% steps ranging from about :2 to x2
fixed a bug in DWORD timers introduced in v2.02.60: now "Warcraft 2" timing works again
revised logit to calculate delays to emulate VSync timing - now should be more accurate and depending on actual screen refresh rate
v2.02.66
fixed palette bug: "Virtua Fighter PC" now shows correct colors.
v2.02.67
fixed log for D3D CreateDevice method, missing in some D3D interface versions
added wildcarded program path: now you needn't set the full pathname, but it is sufficient to specify the rightmost part, e.g. the executable filename.
added emulated mode color conversion from 32BPP to 16BPP. Despite the fact that the best way to run a 32BPP game is against a 32BPP desktop, now it is possible to downgrade 32BPP colors to 16BPP. This fixed the fact that 32BPP games run on a 16BPP desktop showed simply black screens (e.g. Baldur's Gate II)
fixed logic for EnumDisplayModes implementation: now screen resolutions and, for emulated mode only, also color depth, are generated by DxWnd and not derived directly from the real ones. This make it possible to fake support for very low screen resolutions (e.g. 320x200) on modern screens that support them no longer. This make "Genocide" running on both supported resolutions 320x200 and 320x240.
v2.02.68
added screen resolution choice: either a set of SVGA resolutions (mostly for 3:4 monitors), HDTV resolutions (mostly for 16:9 monitors) or the native set of resolutions offered by your monitor / video card.
v2.02.69
improved exception catching to intercept memory violation exceptions and to neutralize offending code. Thank again to olly didasm lib, now the assembly instruction length is automatically determined so that the opcode can be replaced by the correct number of NOP instructions. If this doesn't mean much for you, just consider that this makes playable the Win95 (patched) release of "Star Wars Tie Fighter".
fixed FillRect user32 call - brings some improvements to Imperialism (still far from being acceptable).
v2.02.70
GUI:
fixed saving wrong coordinates when dxwnd is terminated while minimized
added check for adminstrative capabilities on startup
DLL:
fix: moved DrawText/Ex api hooks into right library
fix: corrected child window procedure handling - fixes "Imperialism" child window closing
fixed FillRect coordinate handling - fixes "Imperialism" menus
fixed SetWindowPlacement handling
v2.02.71
fix: Set/GetWindowLongA/W are always hooked.
fix: added user32 GetDCEx hook for GDI Emulation & Directraw mode
fix: hooked "FrameRect", "TabbedTextOutA", "DrawTextA", "DrawTextExA", "FillRect" in scaled mode only
fix: FIXNCHITTEST mode
fix: when main win is closed, blit area is made null to avoid messing with a wrong screen area
added "Release mouse outside window" option. This option causes the get cursor position to detect a centered mouse position when the cursor is moved outside the window, allowing interaction with other windows without scrolling ot the windowed program. Mainly, this option is meant to help people with a physical disability to use other programs (e. g. the virtual keyboard) to play games.
added "Launch" field (optional) to start the program with arguments or a separate task
v2.02.72
fix: fixed Launch field used with "Use DLL injection" flag
fix: somehow improved "Use DLL injection" to avoid blocked tasks and allow exception handling
v2.02.73
Add: preliminary support for (unchecked) "Run in window" flag. Now if the flag is unchecked, DxWnd does NOT force the program to run in a window. Still, some rendering modes are not working perfectly.
add: support for Unicode DefWindowProcW API call
fixed some differences in D3D CreateDevice vs. CreateDeviceEx handling
added "Window frame compensation" input flag to set the cursor position properly in "Sub Commando"
fix: properly handled the case of NULL WindowProc routine in CreateDialog/Indirect API calls. Makes "LEGO Stunt Rally" working.
added support for Unicode SystemParametersInfoW API call
v2.02.74
Add: API hot patching, thank to aqrit precious support. Now Doom 3 is played in window.
hooked GetCursorInfo call
fix: recalculate vsync timers in case of time stretching
fix: log failure for CreateWindowExW wchar api
Add: configurable keyboard commands
Add: timestretch toggle command
Add: "Enable hotkeys" flag to enable/disable hotkeys
fix: eliminated dialogs with timer warning messages (to be investigated...)
fix: moved "no banner" flag to main tab again
fix: potential string violation, possible cause for flash crash?
v2.02.75
Hooked D3DDevice::ShowCursor method to apply force show/hide cursor (preliminary...)
fix: dynamic allocation for WndProc stack to eliminate predefined limit of 256 entries. Star Wars Rebellion uses more than 256.
added: "Suppress D3D8/9 Reset" flag
fix: improved show FPS and Time Stretch overlay so that the two overlays won't overlap each other
fix: bug in ddraw "Locked surface" mode preventing output on screen
fix: fixed bug in critical common portion of the code that was crashing even unhooked programs (namely, Flash Player, ...)
v2.02.76
fixed and enhanced several features about registry emulation: added flags "Emulate registry" (to add missing entries) and "Override registry" (to fake existing entries with different values). Fixed "Requiem Avenging Angel" DirectX bogus check bug.
fixed bug in emulate surface palette handling affecting "Requiem Avenging Angel" colors
v2.02.77
GUI: added program icon display
fix: some log messages
fix: handling of GetProcAddress D3D9 api
fix: handling of EMULATEBUFFER option - fixes "Star Trek Birth of the Federation"
fix: expanded hot patching scope - now can handle QueryPerformanceCounter and fix time stretching on obfuscated version of "Wind Fantasy SP"
added logging in D3DDevice9::GetAdapterIdentifier
v2.02.78
fix: hooked D3D8/9Device::BeginStateBlock
ddraw API hot swappable
log: helper for ChangeDisplaySettings() flags
fix: hot patch handling of loaded modules
log: fixed some messages with no line ending for GetObjectType()
d3d begin of code reorganization and cleaning
ole32, user32 API hot patched
handling of DWL_DLGPROC message
v2.02.79
fix: recovered capability to "pin" ddraw and d3d calls
v2.02.80
Preliminary multilanguage release, english and chinese, many thanks to gsky916 support
fixed Sleep bug for small delays and accelerated timeshift: fixes "Wind Fantasy SP" reported bug
added log for DirectInput::SetCooperativeLevel flags
fixed flip emulation mode when backbuffer is lost: fixes cursor problems in "HellCopter"
fixed Pitch setting in DirectDraw::EnumDisplayModes when in SVGA emulation mode. Let "Outlive" use this setting
v2.02.81
fix: hooked GetMonitorInfoA/W that is a possible way to get the screen resolution. The hooker sets the virtual screen size updating both rcWork & rcMonitor rects in the MONITORINFO structure. This fixes the mouse control in "Tomb Raider Underworld" and likely in other games with a similar engine.
v2.02.82
fix: completed chinese translation and language selection through dxwnd.ini file.
added very preliminary (and incomplete) italian translation for debugging.
v2.02.83
fix: small error in one coordinate scaling procedure
fix: completed translation in italian (just for testing....)
fix: added palette window activation in icon tray menu
fix: supppressed BackBuffer release within D3D7:CreateDevice: this makes "Tetris Worlds" fully playable
add: build-in check for compatibility modes set!
v2.02.84
fix: removed extra reference to ddraw session causing window movements on fullscreen game exit: fixes another "Wind Fantasy SP" reported bug
v2.02.85
fix: revised handling of d3d D3DFORMAT field: fixes "Call of Cthulhu DCotE" color problems
fix: added recovery for rounded child win coordinates: fixes blitting problems in Diablo when win size is not an exact multiple of native resolution.
v2.02.86
fix: thank to aqrit's research, hooked and hanlded user32.dll GetUpdateRgn API. This fixes refresh and crash problems in Diablo & Hellfire.
added bilinear filtering to directdraw palettized 8BPP emulated mode (where it is mostly needed!). A must try is "Genocide" !
v2.02.87
attempt to fix Win8 missing support for earlier ddraw releases (Croc legend of the Gobbos, Project I.G.I., ...)
fix: optimized bilinear filtering with no horizontal / vertical sawtooth artifacts
added support for 16BPP and 32BPP desktop bilinear filtering
suppressed compatibility checking
fix: doubled default window size when bilinear filtering is active
added repositioning of control parent window when main win is moved
added debug messages about hooked window class and name
fix: ignore IME window when hooking main win, destroy it when requested
fix: ignore HWND_MESSAGE type windows
added "Diablo tweak" compatibility flag for Diablo proper screen update handling. It is a temporary tweak waiting to understand better how to properly manage it.
v2.02.88
fix: DIABLOTWEAK flag defaulted to FALSE
add: CLEARTARGET flag - forces a Clear CLEAR_TARGET operation on D3D BeginPaint: useful in combination with wireframe mode.
updated "Optimize CPU" behavior: now it emulates a VSync wait also on D3D8/D3D9. Fixes some "swimming" problem in "Soul Reaver 2", and saves CPU time by limiting the FPS to the refresh rate.
fixed positioning of FPS and time stretching indication on screen overlay
cleaned up GUI project: no more japanese and localized resources, no more unreferenced resources.
GUI: added Desktop status window
GUI: added pixel format descriptor to DxWnd status
v2.02.89
fix: added SVGA 512x384 video mode. Necessary for "Outcast" loading screen.
fix: using WINNLSEnableIME call to suppress IME window.
fix: improved some logging
v2.02.90
added: "Filter winposchange messages" flag - needed for "RollerCoaster Tycoon / Deluxe / II" games
fix: correct handling of texture surfaces for "Zoo Tycoon" in surface emulation mode.
fix: handling of GDI32.dll calls in GetProcAddress
fix: improved logging
fix: GetRgnBox hooking moved to normal window processing, to handle RollerCoaster Tycoon series.
added: GetTempFileName fix to handle Win95 differences. This makes "Powerslide" playable.

View File

@ -583,3 +583,13 @@ v2.02.89
fix: added SVGA 512x384 video mode. Necessary for "Outcast" loading screen.
fix: using WINNLSEnableIME call to suppress IME window.
fix: improved some logging
v2.02.90
added: "Filter winposchange messages" flag - needed for "RollerCoaster Tycoon / Deluxe / II" games
fix: correct handling of texture surfaces for "Zoo Tycoon" in surface emulation mode.
fix: handling of GDI32.dll calls in GetProcAddress
fix: improved logging
fix: GetRgnBox hooking moved to normal window processing, to handle RollerCoaster Tycoon series.
added: GetTempFileName fix to handle Win95 differences. This makes "Powerslide" playable.

View File

@ -1,138 +0,0 @@
/*
*
* Function : DDError()
*
* Purpose : Traces an error (DirectDraw)
*
*/
void DDError(HRESULT hErr)
{
char dderr[256];
char string[1024];
switch (hErr)
{
case DDERR_DDSCAPSCOMPLEXREQUIRED : sprintf(dderr, "DDERR_DDSCAPSCOMPLEXREQUIRED: New for DirectX 7.0. The surface requires the DDSCAPS_COMPLEX flag."); break;
case DDERR_DEVICEDOESNTOWNSURFACE : sprintf(dderr, "DDERR_DEVICEDOESNTOWNSURFACE: Surfaces created by one DirectDraw device cannot be used directly by another DirectDraw device."); break;
case DDERR_EXPIRED : sprintf(dderr, "DDERR_EXPIRED: The data has expired and is therefore no longer valid."); break;
case DDERR_INVALIDSTREAM : sprintf(dderr, "DDERR_INVALIDSTREAM: The specified stream contains invalid data."); break;
case DDERR_MOREDATA : sprintf(dderr, "DDERR_MOREDATA: There is more data available than the specified buffer size can hold."); break;
case DDERR_NEWMODE : sprintf(dderr, "DDERR_NEWMODE: New for DirectX 7.0. When IDirectDraw7::StartModeTest is called with the DDSMT_ISTESTREQUIRED flag, it may return this value to denote that some or all of the resolutions can and should be tested. IDirectDraw7::EvaluateMode returns this value to indicate that the test has switched to a new display mode."); break;
case DDERR_NODRIVERSUPPORT : sprintf(dderr, "DDERR_NODRIVERSUPPORT: New for DirectX 7.0. Testing cannot proceed because the display adapter driver does not enumerate refresh rates."); break;
case DDERR_NOFOCUSWINDOW : sprintf(dderr, "DDERR_NOFOCUSWINDOW: An attempt was made to create or set a device window without first setting the focus window."); break;
case DDERR_NOMONITORINFORMATION : sprintf(dderr, "DDERR_NOMONITORINFORMATION: New for DirectX 7.0. Testing cannot proceed because the monitor has no associated EDID data."); break;
case DDERR_NONONLOCALVIDMEM : sprintf(dderr, "DDERR_NONONLOCALVIDMEM: An attempt was made to allocate nonlocal video memory from a device that does not support nonlocal video memory."); break;
case DDERR_NOOPTIMIZEHW : sprintf(dderr, "DDERR_NOOPTIMIZEHW: The device does not support optimized surfaces."); break;
case DDERR_NOSTEREOHARDWARE : sprintf(dderr, "DDERR_NOSTEREOHARDWARE: There is no stereo hardware present or available."); break;
case DDERR_NOSURFACELEFT : sprintf(dderr, "DDERR_NOSURFACELEFT: There is no hardware present that supports stereo surfaces."); break;
case DDERR_NOTLOADED : sprintf(dderr, "DDERR_NOTLOADED: The surface is an optimized surface, but it has not yet been allocated any memory."); break;
case DDERR_OVERLAPPINGRECTS : sprintf(dderr, "DDERR_OVERLAPPINGRECTS: The source and destination rectangles are on the same surface and overlap each other."); break;
case DDERR_TESTFINISHED : sprintf(dderr, "DDERR_TESTFINISHED: New for DirectX 7.0. When returned by the IDirectDraw7::StartModeTest method, this value means that no test could be initiated because all the resolutions chosen for testing already have refresh rate information in the registry. When returned by IDirectDraw7::EvaluateMode, the value means that DirectDraw has completed a refresh rate test."); break;
case DDERR_VIDEONOTACTIVE : sprintf(dderr, "DDERR_VIDEONOTACTIVE: The video port is not active."); break;
case DDERR_ALREADYINITIALIZED : sprintf(dderr, "DDERR_ALREADYINITIALIZED: The object has already been initialized."); break;
case DDERR_CANNOTATTACHSURFACE : sprintf(dderr, "DDERR_CANNOTATTACHSURFACE: A surface cannot be attached to another requested surface."); break;
case DDERR_CANNOTDETACHSURFACE : sprintf(dderr, "DDERR_CANNOTDETACHSURFACE: A surface cannot be detached from another requested surface."); break;
case DDERR_CURRENTLYNOTAVAIL : sprintf(dderr, "DDERR_CURRENTLYNOTAVAIL: No support is currently available"); break;
case DDERR_EXCEPTION : sprintf(dderr, "DDERR_EXCEPTION: An exception was encountered while performing the requested operation."); break;
case DDERR_GENERIC : sprintf(dderr, "DDERR_GENERIC: There is an undefined error condition."); break;
case DDERR_HEIGHTALIGN : sprintf(dderr, "DDERR_HEIGHTALIGN: The height of the provided rectangle is not a multiple of the required alignment."); break;
case DDERR_INCOMPATIBLEPRIMARY : sprintf(dderr, "DDERR_INCOMPATIBLEPRIMARY: The primary surface creation request does not match the existing primary surface."); break;
case DDERR_INVALIDCAPS : sprintf(dderr, "DDERR_INVALIDCAPS: One or more of the capability bits passed to the callback function are incorrect."); break;
case DDERR_INVALIDCLIPLIST : sprintf(dderr, "DDERR_INVALIDCLIPLIST: DirectDraw does not support the provided clip list."); break;
case DDERR_INVALIDMODE : sprintf(dderr, "DDERR_INVALIDMODE: DirectDraw does not support the requested mode."); break;
case DDERR_INVALIDOBJECT : sprintf(dderr, "DDERR_INVALIDOBJECT: DirectDraw received a pointer that was an invalid DirectDraw object."); break;
case DDERR_INVALIDPARAMS : sprintf(dderr, "DDERR_INVALIDPARAMS: One or more of the parameters passed to the method are incorrect."); break;
case DDERR_INVALIDPIXELFORMAT : sprintf(dderr, "DDERR_INVALIDPIXELFORMAT: The pixel format was invalid as specified."); break;
case DDERR_INVALIDRECT : sprintf(dderr, "DDERR_INVALIDRECT: The provided rectangle was invalid."); break;
case DDERR_LOCKEDSURFACES : sprintf(dderr, "DDERR_LOCKEDSURFACES: One or more surfaces are locked, causing the failure of the requested operation."); break;
case DDERR_NO3D : sprintf(dderr, "DDERR_NO3D: No 3-D hardware or emulation is present."); break;
case DDERR_NOALPHAHW : sprintf(dderr, "DDERR_NOALPHAHW: No alpha-acceleration hardware is present or available, causing the failure of the requested operation."); break;
case DDERR_NOCLIPLIST : sprintf(dderr, "DDERR_NOCLIPLIST: No clip list is available."); break;
case DDERR_NOCOLORCONVHW : sprintf(dderr, "DDERR_NOCOLORCONVHW: No color-conversion hardware is present or available."); break;
case DDERR_NOCOOPERATIVELEVELSET : sprintf(dderr, "DDERR_NOCOOPERATIVELEVELSET: A create function was called without the IDirectDraw7::SetCooperativeLevel method."); break;
case DDERR_NOCOLORKEY : sprintf(dderr, "DDERR_NOCOLORKEY: The surface does not currently have a color key."); break;
case DDERR_NOCOLORKEYHW : sprintf(dderr, "DDERR_NOCOLORKEYHW: There is no hardware support for the destination color key."); break;
case DDERR_NODIRECTDRAWSUPPORT : sprintf(dderr, "DDERR_NODIRECTDRAWSUPPORT: DirectDraw support is not possible with the current display driver."); break;
case DDERR_NOEXCLUSIVEMODE : sprintf(dderr, "DDERR_NOEXCLUSIVEMODE: The operation requires the application to have exclusive mode, but the application does not have exclusive mode."); break;
case DDERR_NOFLIPHW : sprintf(dderr, "DDERR_NOFLIPHW: Flipping visible surfaces is not supported."); break;
case DDERR_NOGDI : sprintf(dderr, "DDERR_NOGDI: No GDI is present."); break;
case DDERR_NOMIRRORHW : sprintf(dderr, "DDERR_NOMIRRORHW: No mirroring hardware is present or available."); break;
case DDERR_NOTFOUND : sprintf(dderr, "DDERR_NOTFOUND: The requested item was not found."); break;
case DDERR_NOOVERLAYHW : sprintf(dderr, "DDERR_NOOVERLAYHW: No overlay hardware is present or available."); break;
case DDERR_NORASTEROPHW : sprintf(dderr, "DDERR_NORASTEROPHW: No appropriate raster-operation hardware is present or available."); break;
case DDERR_NOROTATIONHW : sprintf(dderr, "DDERR_NOROTATIONHW: No rotation hardware is present or available."); break;
case DDERR_NOSTRETCHHW : sprintf(dderr, "DDERR_NOSTRETCHHW: There is no hardware support for stretching."); break;
case DDERR_NOT4BITCOLOR : sprintf(dderr, "DDERR_NOT4BITCOLOR: The DirectDrawSurface object is not using a 4-bit color palette, and the requested operation requires a 4-bit color palette."); break;
case DDERR_NOT4BITCOLORINDEX : sprintf(dderr, "DDERR_NOT4BITCOLORINDEX: The DirectDrawSurface object is not using a 4-bit color index palette, and the requested operation requires a 4-bit color index palette."); break;
case DDERR_NOT8BITCOLOR : sprintf(dderr, "DDERR_NOT8BITCOLOR: The DirectDrawSurface object is not using an 8-bit color palette, and the requested operation requires an 8-bit color palette."); break;
case DDERR_NOTEXTUREHW : sprintf(dderr, "DDERR_NOTEXTUREHW: The operation cannot be carried out because no texture-mapping hardware is present or available."); break;
case DDERR_NOVSYNCHW : sprintf(dderr, "DDERR_NOVSYNCHW: There is no hardware support for vertical blank synchronized operations."); break;
case DDERR_NOZBUFFERHW : sprintf(dderr, "DDERR_NOZBUFFERHW: The operation to create a z-buffer in display memory or to perform a blit, using a z-buffer cannot be carried out because there is no hardware support for z-buffers."); break;
case DDERR_NOZOVERLAYHW : sprintf(dderr, "DDERR_NOZOVERLAYHW: The overlay surfaces cannot be z-layered, based on the z-order because the hardware does not support z-ordering of overlays."); break;
case DDERR_OUTOFCAPS : sprintf(dderr, "DDERR_OUTOFCAPS: The hardware needed for the requested operation has already been allocated."); break;
case DDERR_OUTOFMEMORY : sprintf(dderr, "DDERR_OUTOFMEMORY: DirectDraw does not have enough memory to perform the operation."); break;
case DDERR_OUTOFVIDEOMEMORY : sprintf(dderr, "DDERR_OUTOFVIDEOMEMORY: DirectDraw does not have enough display memory to perform the operation."); break;
case DDERR_OVERLAYCANTCLIP : sprintf(dderr, "DDERR_OVERLAYCANTCLIP: The hardware does not support clipped overlays."); break;
case DDERR_OVERLAYCOLORKEYONLYONEACTIVE : sprintf(dderr, "DDERR_OVERLAYCOLORKEYONLYONEACTIVE: An attempt was made to have more than one color key active on an overlay."); break;
case DDERR_PALETTEBUSY : sprintf(dderr, "DDERR_PALETTEBUSY: Access to this palette is refused because the palette is locked by another thread."); break;
case DDERR_COLORKEYNOTSET : sprintf(dderr, "DDERR_COLORKEYNOTSET: No source color key is specified for this operation."); break;
case DDERR_SURFACEALREADYATTACHED : sprintf(dderr, "DDERR_SURFACEALREADYATTACHED: An attempt was made to attach a surface to another surface to which it is already attached."); break;
case DDERR_SURFACEALREADYDEPENDENT : sprintf(dderr, "DDERR_SURFACEALREADYDEPENDENT: An attempt was made to make a surface a dependency of another surface on which it is already dependent."); break;
case DDERR_SURFACEBUSY : sprintf(dderr, "DDERR_SURFACEBUSY: Access to the surface is refused because the surface is locked by another thread."); break;
case DDERR_CANTLOCKSURFACE : sprintf(dderr, "DDERR_CANTLOCKSURFACE: Access to this surface is refused because an attempt was made to lock the primary surface without DCI support."); break;
case DDERR_SURFACEISOBSCURED : sprintf(dderr, "DDERR_SURFACEISOBSCURED: Access to the surface is refused because the surface is obscured."); break;
case DDERR_SURFACELOST : sprintf(dderr, "DDERR_SURFACELOST: Access to the surface is refused because the surface memory is gone. Call the IDirectDrawSurface7::Restore method on this surface to restore the memory associated with it."); break;
case DDERR_SURFACENOTATTACHED : sprintf(dderr, "DDERR_SURFACENOTATTACHED: The requested surface is not attached."); break;
case DDERR_TOOBIGHEIGHT : sprintf(dderr, "DDERR_TOOBIGHEIGHT: The height requested by DirectDraw is too large."); break;
case DDERR_TOOBIGSIZE : sprintf(dderr, "DDERR_TOOBIGSIZE: The size requested by DirectDraw is too large. However, the individual height and width are valid sizes."); break;
case DDERR_TOOBIGWIDTH : sprintf(dderr, "DDERR_TOOBIGWIDTH: The width requested by DirectDraw is too large."); break;
case DDERR_UNSUPPORTED : sprintf(dderr, "DDERR_UNSUPPORTED: The operation is not supported."); break;
case DDERR_UNSUPPORTEDFORMAT : sprintf(dderr, "DDERR_UNSUPPORTEDFORMAT: The pixel format requested is not supported by DirectDraw."); break;
case DDERR_UNSUPPORTEDMASK : sprintf(dderr, "DDERR_UNSUPPORTEDMASK: The bitmask in the pixel format requested is not supported by DirectDraw."); break;
case DDERR_VERTICALBLANKINPROGRESS : sprintf(dderr, "DDERR_VERTICALBLANKINPROGRESS: A vertical blank is in progress."); break;
case DDERR_WASSTILLDRAWING : sprintf(dderr, "DDERR_WASSTILLDRAWING: The previous blit operation that is transferring information to or from this surface is incomplete."); break;
case DDERR_XALIGN : sprintf(dderr, "DDERR_XALIGN: The provided rectangle was not horizontally aligned on a required boundary."); break;
case DDERR_INVALIDDIRECTDRAWGUID : sprintf(dderr, "DDERR_INVALIDDIRECTDRAWGUID: The globally unique identifier (GUID) passed to the DirectDrawCreate function is not a valid DirectDraw driver identifier."); break;
case DDERR_DIRECTDRAWALREADYCREATED : sprintf(dderr, "DDERR_DIRECTDRAWALREADYCREATED: A DirectDraw object representing this driver has already been created for this process."); break;
case DDERR_NODIRECTDRAWHW : sprintf(dderr, "DDERR_NODIRECTDRAWHW: Hardware-only DirectDraw object creation is not possible; the driver does not support any hardware."); break;
case DDERR_PRIMARYSURFACEALREADYEXISTS : sprintf(dderr, "DDERR_PRIMARYSURFACEALREADYEXISTS: This process has already created a primary surface."); break;
case DDERR_NOEMULATION : sprintf(dderr, "DDERR_NOEMULATION: Software emulation is not available."); break;
case DDERR_REGIONTOOSMALL : sprintf(dderr, "DDERR_REGIONTOOSMALL: The region passed to the IDirectDrawClipper::GetClipList method is too small."); break;
case DDERR_CLIPPERISUSINGHWND : sprintf(dderr, "DDERR_CLIPPERISUSINGHWND: An attempt was made to set a clip list for a DirectDrawClipper object that is already monitoring a window handle."); break;
case DDERR_NOCLIPPERATTACHED : sprintf(dderr, "DDERR_NOCLIPPERATTACHED: No DirectDrawClipper object is attached to the surface object."); break;
case DDERR_NOHWND : sprintf(dderr, "DDERR_NOHWND: Clipper notification requires a window handle, or no window handle has been previously set as the cooperative level window handle."); break;
case DDERR_HWNDSUBCLASSED : sprintf(dderr, "DDERR_HWNDSUBCLASSED: DirectDraw is prevented from restoring state because the DirectDraw cooperative-level window handle has been subclassed."); break;
case DDERR_HWNDALREADYSET : sprintf(dderr, "DDERR_HWNDALREADYSET: The DirectDraw cooperative-level window handle has already been set. It cannot be reset while the process has surfaces or palettes created."); break;
case DDERR_NOPALETTEATTACHED : sprintf(dderr, "DDERR_NOPALETTEATTACHED: No palette object is attached to this surface."); break;
case DDERR_NOPALETTEHW : sprintf(dderr, "DDERR_NOPALETTEHW: There is no hardware support for 16- or 256-color palettes."); break;
case DDERR_BLTFASTCANTCLIP : sprintf(dderr, "DDERR_BLTFASTCANTCLIP: A DirectDrawClipper object is attached to a source surface that has passed into a call to the IDirectDrawSurface7::BltFast method."); break;
case DDERR_NOBLTHW : sprintf(dderr, "DDERR_NOBLTHW: No blitter hardware is present."); break;
case DDERR_NODDROPSHW : sprintf(dderr, "DDERR_NODDROPSHW: No DirectDraw raster-operation (ROP) hardware is available."); break;
case DDERR_OVERLAYNOTVISIBLE : sprintf(dderr, "DDERR_OVERLAYNOTVISIBLE: The IDirectDrawSurface7::GetOverlayPosition method was called on a hidden overlay."); break;
case DDERR_NOOVERLAYDEST : sprintf(dderr, "DDERR_NOOVERLAYDEST: The IDirectDrawSurface7::GetOverlayPosition method is called on an overlay that the IDirectDrawSurface7::UpdateOverlay method has not been called on to establish as a destination."); break;
case DDERR_INVALIDPOSITION : sprintf(dderr, "DDERR_INVALIDPOSITION: The position of the overlay on the destination is no longer legal."); break;
case DDERR_NOTAOVERLAYSURFACE : sprintf(dderr, "DDERR_NOTAOVERLAYSURFACE: An overlay component is called for a nonoverlay surface."); break;
case DDERR_EXCLUSIVEMODEALREADYSET : sprintf(dderr, "DDERR_EXCLUSIVEMODEALREADYSET: An attempt was made to set the cooperative level when it was already set to exclusive."); break;
case DDERR_NOTFLIPPABLE : sprintf(dderr, "DDERR_NOTFLIPPABLE: An attempt was made to flip a surface that cannot be flipped."); break;
case DDERR_CANTDUPLICATE : sprintf(dderr, "DDERR_CANTDUPLICATE: Primary and 3-D surfaces, or surfaces that are implicitly created, cannot be duplicated."); break;
case DDERR_NOTLOCKED : sprintf(dderr, "DDERR_NOTLOCKED: An attempt was made to unlock a surface that was not locked."); break;
case DDERR_CANTCREATEDC : sprintf(dderr, "DDERR_CANTCREATEDC: Windows cannot create any more device contexts (DCs), or a DC has requested a palette-indexed surface when the surface had no palette and the display mode was not palette-indexed (in this case DirectDraw cannot select a proper palette into the DC)."); break;
case DDERR_NODC : sprintf(dderr, "DDERR_NODC: No device context (DC) has ever been created for this surface."); break;
case DDERR_WRONGMODE : sprintf(dderr, "DDERR_WRONGMODE: This surface cannot be restored because it was created in a different mode."); break;
case DDERR_IMPLICITLYCREATED : sprintf(dderr, "DDERR_IMPLICITLYCREATED: The surface cannot be restored because it is an implicitly created surface."); break;
case DDERR_NOTPALETTIZED : sprintf(dderr, "DDERR_NOTPALETTIZED: The surface being used is not a palette-based surface."); break;
case DDERR_UNSUPPORTEDMODE : sprintf(dderr, "DDERR_UNSUPPORTEDMODE: The display is currently in an unsupported mode."); break;
case DDERR_NOMIPMAPHW : sprintf(dderr, "DDERR_NOMIPMAPHW: No mipmap-capable texture mapping hardware is present or available."); break;
case DDERR_INVALIDSURFACETYPE : sprintf(dderr, "DDERR_INVALIDSURFACETYPE: The surface was of the wrong type."); break;
case DDERR_DCALREADYCREATED : sprintf(dderr, "DDERR_DCALREADYCREATED: A device context (DC) has already been returned for this surface. Only one DC can be retrieved for each surface."); break;
case DDERR_CANTPAGELOCK : sprintf(dderr, "DDERR_CANTPAGELOCK: An attempt to page-lock a surface failed. Page lock does not work on a display-memory surface or an emulated primary surface."); break;
case DDERR_CANTPAGEUNLOCK : sprintf(dderr, "DDERR_CANTPAGEUNLOCK: An attempt to page-unlock a surface failed. Page unlock does not work on a display-memory surface or an emulated primary surface."); break;
case DDERR_NOTPAGELOCKED : sprintf(dderr, "DDERR_NOTPAGELOCKED: An attempt was made to page-unlock a surface with no outstanding page locks."); break;
case DDERR_NOTINITIALIZED : sprintf(dderr, "DDERR_NOTINITIALIZED: An attempt was made to call an interface method of a DirectDraw object created by CoCreateInstance before the object was initialized."); break;
default : sprintf(dderr, "Unknown Error"); break;
}
sprintf(string, "DirectDraw Error %s\n", dderr);
OutputDebugString(string);
}

View File

@ -582,7 +582,7 @@ void InitScreenParameters()
GetHookInfo()->DXVersion=0; // unknown
GetHookInfo()->isLogging=(dxw.dwTFlags & OUTTRACE);
if(!EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &CurrDevMode)){
if(!(*pEnumDisplaySettings)(NULL, ENUM_CURRENT_SETTINGS, &CurrDevMode)){
OutTraceE("EnumDisplaySettings: ERROR err=%d at %d\n", GetLastError(), __LINE__);
return;
}
@ -867,6 +867,17 @@ int lpddHookedVersion(LPDIRECTDRAW lpdd)
return 0;
}
void RegisterPixelFormat(LPDIRECTDRAWSURFACE lpdds)
{
DDSURFACEDESC2 ddsdpix;
memset((void *)&ddsdpix, 0, sizeof(DDSURFACEDESC2));
ddsdpix.dwSize = SurfaceDescrSize(lpdds);
ddsdpix.dwFlags = DDSD_PIXELFORMAT;
(*pGetSurfaceDescMethod(lpdds))((LPDIRECTDRAWSURFACE2)lpdds, &ddsdpix);
GetHookInfo()->pfd=ddsdpix.ddpfPixelFormat; // v2.02.88
OutTraceB("RegisterPixelFormat: lpdds=%x %s\n", lpdds, DumpPixelFormat(&ddsdpix));
}
/* ------------------------------------------------------------------ */
// SetPixFmt: builds a pixel format descriptor when no one is specified, starting from the color depth, the current
@ -2186,6 +2197,17 @@ void FixSurfaceCapsAnalytic(LPDDSURFACEDESC2 lpddsd, int dxversion)
break;
case DDSD_CAPS|DDSD_WIDTH|DDSD_HEIGHT|DDSD_PIXELFORMAT:
switch (lpddsd->ddsCaps.dwCaps){
case DDSCAPS_COMPLEX|DDSCAPS_SYSTEMMEMORY|DDSCAPS_TEXTURE|DDSCAPS_MIPMAP: // Powerslide
case DDSCAPS_COMPLEX|DDSCAPS_VIDEOMEMORY|DDSCAPS_TEXTURE|DDSCAPS_MIPMAP: // Powerslide
return;
break;
case DDSCAPS_SYSTEMMEMORY|DDSCAPS_TEXTURE|DDSCAPS_3DDEVICE:
case DDSCAPS_OVERLAY|DDSCAPS_VIDEOMEMORY|DDSCAPS_LOCALVIDMEM:
case DDSCAPS_COMPLEX|DDSCAPS_FLIP|DDSCAPS_OVERLAY|DDSCAPS_VIDEOMEMORY|DDSCAPS_LOCALVIDMEM:
case DDSCAPS_COMPLEX|DDSCAPS_FLIP|DDSCAPS_OVERLAY|DDSCAPS_VIDEOMEMORY:
// Zoo Tycoon
return;
break;
case DDSCAPS_OFFSCREENPLAIN|DDSCAPS_3DDEVICE|DDSCAPS_VIDEOMEMORY|DDSCAPS_LOCALVIDMEM:
// Empire Earth
// tbd
@ -2221,7 +2243,8 @@ void FixSurfaceCapsAnalytic(LPDDSURFACEDESC2 lpddsd, int dxversion)
break;
case DDSCAPS_OFFSCREENPLAIN|DDSCAPS_VIDEOMEMORY|DDSCAPS_LOCALVIDMEM:
// Empire Earth
lpddsd->ddsCaps.dwCaps = (DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN);
// Zoo Tycoon: better leave as it is....
// lpddsd->ddsCaps.dwCaps = (DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN); ????
return;
break;
case DDSCAPS_COMPLEX|DDSCAPS_TEXTURE|DDSCAPS_MIPMAP:
@ -2339,7 +2362,10 @@ static void FixSurfaceCaps(LPDDSURFACEDESC2 lpddsd, int dxversion)
lpddsd->ddsCaps.dwCaps = (DDSCAPS_SYSTEMMEMORY|DDSCAPS_ZBUFFER);
return;
}
if((lpddsd->dwFlags & DDSD_CAPS) && (lpddsd->ddsCaps.dwCaps & DDSCAPS_3DDEVICE)) { // 3DDEVICE: enforce PIXELFORMAT on MEMORY
if((lpddsd->dwFlags & DDSD_CAPS) &&
(lpddsd->ddsCaps.dwCaps & DDSCAPS_3DDEVICE) &&
!(lpddsd->ddsCaps.dwCaps & DDSCAPS_TEXTURE)) // v2.02.90: added for "Zoo Tycoon" textures
{ // 3DDEVICE no TEXTURE: enforce PIXELFORMAT on MEMORY
lpddsd->dwFlags |= DDSD_PIXELFORMAT;
lpddsd->ddsCaps.dwCaps = (DDSCAPS_OFFSCREENPLAIN|DDSCAPS_SYSTEMMEMORY|DDSCAPS_3DDEVICE);
GetPixFmt(lpddsd);
@ -2831,13 +2857,7 @@ static HRESULT WINAPI extCreateSurface(int dxversion, CreateSurface_Type pCreate
if(res) return res;
lpDDSPrim = *lplpdds;
dxw.MarkPrimarySurface(lpDDSPrim);
DDSURFACEDESC2 ddsdpix;
memset((void *)&ddsdpix, 0, sizeof(DDSURFACEDESC));
ddsdpix.dwSize = sizeof(DDSURFACEDESC);
ddsdpix.dwFlags = DDSD_PIXELFORMAT;
(*pGetSurfaceDescMethod(lpDDSPrim))((LPDIRECTDRAWSURFACE2)lpDDSPrim, &ddsdpix);
GetHookInfo()->pfd=ddsdpix.ddpfPixelFormat; // v2.02.88
RegisterPixelFormat(lpDDSPrim);
if (BBCount){
// build emulated backbuffer surface
@ -3204,7 +3224,8 @@ HRESULT WINAPI sBlt(char *api, LPDIRECTDRAWSURFACE lpdds, LPRECT lpdestrect,
if(dxw.HandleFPS()) return DD_OK;
destrect=dxw.MapWindowRect(lpdestrect);
//OutTrace("DESTRECT=(%d,%d)-(%d,%d)\n", destrect.left, destrect.top, destrect.right, destrect.bottom);
//OutTraceB("DESTRECT=(%d,%d)-(%d,%d)\n", destrect.left, destrect.top, destrect.right, destrect.bottom);
if(!(dxw.dwFlags1 & (EMULATESURFACE|EMULATEBUFFER))){
res=0;
@ -4868,7 +4889,7 @@ HRESULT WINAPI extDDGetGammaRamp(LPDIRECTDRAWSURFACE lpdds, DWORD dwFlags, LPDDG
HRESULT WINAPI extGetAvailableVidMem(LPDIRECTDRAW lpdd, LPDDSCAPS lpDDSCaps, LPDWORD lpdwTotal, LPDWORD lpdwFree, GetAvailableVidMem_Type pGetAvailableVidMem)
{
HRESULT res;
HRESULT res;
const DWORD dwMaxMem = 0x7FFFF000;
OutTraceDDRAW("GetAvailableVidMem(D): lpdd=%x\n", lpdd);
res=(*pGetAvailableVidMem)(lpdd, lpDDSCaps, lpdwTotal, lpdwFree);
@ -4876,7 +4897,7 @@ HRESULT WINAPI extDDGetGammaRamp(LPDIRECTDRAWSURFACE lpdds, DWORD dwFlags, LPDDG
if((dxw.dwFlags3 & FORCESHEL) && (res==DDERR_NODIRECTDRAWHW)){
// fake some video memory....
OutTraceDW("GetAvailableVidMem(D): FORCESHEL mode Total=Free=%x\n", dwMaxMem);
*lpdwTotal = dwMaxMem;
*lpdwTotal = dwMaxMem;
*lpdwFree = dwMaxMem;
return DD_OK;
}

View File

@ -294,7 +294,7 @@ static HRESULT WINAPI BilinearBlt_8_to_32(LPDIRECTDRAWSURFACE lpddsdst, LPRECT l
dest+=2;
}
if(dxw.dwFlags3 & MARKBLIT) MarkRect32(dest0, w, h, destpitch);
if(dxw.dwFlags3 & MARKBLIT) MarkRect32(dest0, 2*w, 2*h, destpitch);
res=(*pUnlockMethod(lpddsdst))(lpddsdst, lpdestrect);
if (res) OutTraceE("BilBlt8_32: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddsdst, res, ExplainDDError(res), __LINE__);
@ -472,7 +472,7 @@ static HRESULT WINAPI BilinearBlt_16_to_32(LPDIRECTDRAWSURFACE lpddsdst, LPRECT
dest+=2;
}
if(dxw.dwFlags3 & MARKBLIT) MarkRect32(dest0, w, h, destpitch);
if(dxw.dwFlags3 & MARKBLIT) MarkRect32(dest0, 2*w, 2*h, destpitch);
res=(*pUnlockMethod(lpddsdst))(lpddsdst, lpdestrect);
if (res) OutTraceE("BilBlt16_32: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddsdst, res, ExplainDDError(res), __LINE__);
@ -798,7 +798,7 @@ static HRESULT WINAPI BilinearBlt_8_to_16(LPDIRECTDRAWSURFACE lpddsdst, LPRECT l
dest+=2;
}
if(dxw.dwFlags3 & MARKBLIT) MarkRect16(dest0, w, h, destpitch);
if(dxw.dwFlags3 & MARKBLIT) MarkRect16(dest0, 2*w, 2*h, destpitch);
res=(*pUnlockMethod(lpddsdst))(lpddsdst, lpdestrect);
if (res) OutTraceE("BilBlt8_16: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddsdst, res, ExplainDDError(res), __LINE__);
@ -915,7 +915,7 @@ static HRESULT WINAPI BilinearBlt_16_to_16(LPDIRECTDRAWSURFACE lpddsdst, LPRECT
dest+=2;
}
if(dxw.dwFlags3 & MARKBLIT) MarkRect16((SHORT *)dest0, w, h, destpitch);
if(dxw.dwFlags3 & MARKBLIT) MarkRect16((SHORT *)dest0, 2*w, 2*h, destpitch);
res=(*pUnlockMethod(lpddsdst))(lpddsdst, lpdestrect);
if (res) OutTraceE("BilBlt16_16: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddsdst, res, ExplainDDError(res), __LINE__);
@ -1160,7 +1160,7 @@ static HRESULT WINAPI BilinearBlt_32_to_32(LPDIRECTDRAWSURFACE lpddsdst, LPRECT
dest+=2;
}
if(dxw.dwFlags3 & MARKBLIT) MarkRect16((SHORT *)dest0, w, h, destpitch);
if(dxw.dwFlags3 & MARKBLIT) MarkRect16((SHORT *)dest0, 2*w, 2*h, destpitch);
res=(*pUnlockMethod(lpddsdst))(lpddsdst, lpdestrect);
if (res) OutTraceE("BilBlt32_32: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddsdst, res, ExplainDDError(res), __LINE__);

View File

@ -1731,4 +1731,11 @@ char *ExplainDICooperativeFlags(DWORD c)
if (l>strlen("DISCL_")) eb[l-1]=0; // delete last '+' if any
else strcpy(eb,"NULL");
return(eb);
}
}
char *ExplainRegionType(DWORD c)
{
static char *sRetCodes[4]={"ERROR", "NULLREGION", "SIMPLEREGION", "COMPLEXREGION"};
if(c<4) return sRetCodes[c];
return "unknown";
}

View File

@ -51,3 +51,4 @@ extern char *ExplainRenderstateValue(DWORD);
extern char *ExplainWfPFlags(DWORD);
extern char *ExplainChangeDisplaySettingsFlags(DWORD);
extern char *ExplainDICooperativeFlags(DWORD);
extern char *ExplainRegionType(DWORD);

View File

@ -93,7 +93,7 @@ static char *Flag4Names[32]={
};
static char *Flag5Names[32]={
"DIABLOTWEAK", "CLEARTARGET", "", "",
"DIABLOTWEAK", "CLEARTARGET", "NOWINPOSCHANGES", "",
"", "", "", "",
"", "", "", "",
"", "", "", "",
@ -747,7 +747,25 @@ LRESULT CALLBACK extWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
// v2.1.93: adjust clipping region
OutTraceW("WindowProc[%x]: WinMsg=[0x%x]%s(%x,%x)\n", hwnd, message, ExplainWinMessage(message), wparam, lparam);
if(IsTraceW){
OutTrace("WindowProc[%x]: WinMsg=[0x%x]%s(%x,%x)", hwnd, message, ExplainWinMessage(message), wparam, lparam);
switch(message){
case WM_WINDOWPOSCHANGING:
case WM_WINDOWPOSCHANGED:
LPWINDOWPOS wp;
wp = (LPWINDOWPOS)lparam;
OutTrace(" pos=(%d,%d) size=(%dx%d) flags=%x(%s)", wp->x, wp->y, wp->cx, wp->cy, wp->flags, ExplainWPFlags(wp->flags));
break;
case WM_MOVE:
OutTrace(" pos=(%d,%d)", HIWORD(lparam), LOWORD(lparam));
break;
case WM_SIZE:
static char *modes[5]={"RESTORED", "MINIMIZED", "MAXIMIZED", "MAXSHOW", "MAXHIDE"};
OutTrace(" mode=SIZE_%s size=(%dx%d)", modes[wparam % 5], HIWORD(lparam), LOWORD(lparam));
break;
}
OutTrace("\n");
}
#if 0
if(dxw.dwFlags2 & WALLPAPERMODE) {
@ -768,7 +786,6 @@ LRESULT CALLBACK extWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
#endif
if(dxw.dwFlags3 & FILTERMESSAGES){
LRESULT ret;
switch(message){
case WM_NCMOUSEMOVE:
case WM_NCLBUTTONDOWN:
@ -780,9 +797,8 @@ LRESULT CALLBACK extWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
case WM_NCMBUTTONDOWN:
case WM_NCMBUTTONUP:
case WM_NCMBUTTONDBLCLK:
OutTraceW("WindowProc[%x]: WinMsg=%x filtered message=%x(%s)\n", hwnd, message, ExplainWinMessage(message));
ret=0;
return ret;
OutTraceDW("WindowProc[%x]: SUPPRESS WinMsg=[0x%x]%s(%x,%x)\n", hwnd, message, ExplainWinMessage(message), wparam, lparam);
return 0;
}
}
@ -825,7 +841,7 @@ LRESULT CALLBACK extWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
case WM_IME_KEYDOWN:
case WM_IME_KEYUP:
if(dxw.dwFlags2 & SUPPRESSIME){
OutTraceDW("WindowProc: SUPPRESS WinMsg=[0x%x]%s(%x,%x)\n", message, ExplainWinMessage(message), wparam, lparam);
OutTraceDW("WindowProc[%x]: SUPPRESS IME WinMsg=[0x%x]%s(%x,%x)\n", hwnd, message, ExplainWinMessage(message), wparam, lparam);
return 0;
}
break;
@ -864,11 +880,16 @@ LRESULT CALLBACK extWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
case WM_WINDOWPOSCHANGING:
case WM_WINDOWPOSCHANGED:
if(dxw.Windowize && dxw.IsFullScreen()){
if(dxw.dwFlags5 & NOWINPOSCHANGES){
OutTraceDW("WindowProc: %s - suppressed\n", message==WM_WINDOWPOSCHANGED ? "WM_WINDOWPOSCHANGED" : "WM_WINDOWPOSCHANGING");
return 0;
}
extern HWND hControlParentWnd;
LPWINDOWPOS wp;
wp = (LPWINDOWPOS)lparam;
dxwFixWindowPos("WindowProc", hwnd, lparam);
OutTraceDW("WindowProc: WM_WINDOWPOSCHANGING fixed size=(%d,%d)\n", wp->cx, wp->cy);
OutTraceDW("WindowProc: %s fixed size=(%d,%d)\n",
(message == WM_WINDOWPOSCHANGED) ? "WM_WINDOWPOSCHANGED" : "WM_WINDOWPOSCHANGING", wp->cx, wp->cy);
// try to lock main wind & control parent together
if((message==WM_WINDOWPOSCHANGED) && hControlParentWnd){
if(dxw.IsDesktop(hwnd)) {
@ -1104,7 +1125,7 @@ static void SaveScreenMode()
static BOOL DoOnce=FALSE;
if(DoOnce) return;
DoOnce=TRUE;
EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &InitDevMode);
(*pEnumDisplaySettings)(NULL, ENUM_CURRENT_SETTINGS, &InitDevMode);
OutTraceDW("DXWND: Initial display mode WxH=(%dx%d) BitsPerPel=%d\n",
InitDevMode.dmPelsWidth, InitDevMode.dmPelsHeight, InitDevMode.dmBitsPerPel);
}
@ -1113,7 +1134,7 @@ static void RecoverScreenMode()
{
DEVMODE CurrentDevMode;
BOOL res;
EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &CurrentDevMode);
(*pEnumDisplaySettings)(NULL, ENUM_CURRENT_SETTINGS, &CurrentDevMode);
OutTraceDW("ChangeDisplaySettings: recover CURRENT WxH=(%dx%d) BitsPerPel=%d TARGET WxH=(%dx%d) BitsPerPel=%d\n",
CurrentDevMode.dmPelsWidth, CurrentDevMode.dmPelsHeight, CurrentDevMode.dmBitsPerPel,
InitDevMode.dmPelsWidth, InitDevMode.dmPelsHeight, InitDevMode.dmBitsPerPel);
@ -1126,7 +1147,7 @@ void SwitchTo16BPP()
{
DEVMODE CurrentDevMode;
BOOL res;
EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &CurrentDevMode);
(*pEnumDisplaySettings)(NULL, ENUM_CURRENT_SETTINGS, &CurrentDevMode);
OutTraceDW("ChangeDisplaySettings: CURRENT wxh=(%dx%d) BitsPerPel=%d -> 16\n",
CurrentDevMode.dmPelsWidth, CurrentDevMode.dmPelsHeight, CurrentDevMode.dmBitsPerPel);
CurrentDevMode.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT;

View File

@ -26,6 +26,7 @@ extern FARPROC Remap_d3d11_ProcAddress(LPCSTR, HMODULE);
extern FARPROC Remap_gl_ProcAddress(LPCSTR, HMODULE);
extern FARPROC Remap_smack_ProcAddress(LPCSTR, HMODULE);
extern FARPROC Remap_user32_ProcAddress(LPCSTR, HMODULE);
extern FARPROC Remap_GDI32_ProcAddress(LPCSTR, HMODULE);
extern FARPROC Remap_kernel32_ProcAddress(LPCSTR, HMODULE);
extern FARPROC Remap_ole32_ProcAddress(LPCSTR, HMODULE);
extern FARPROC Remap_trust_ProcAddress(LPCSTR, HMODULE);

View File

@ -112,6 +112,7 @@ void dxwCore::InitTarget(TARGETMAP *target)
void dxwCore::SetScreenSize(void)
{
SetScreenSize(800, 600); // set to default screen resolution
//SetScreenSize(640, 480); // set to default screen resolution
}
void dxwCore::SetScreenSize(int x, int y)
@ -165,6 +166,7 @@ void dxwCore::DumpDesktopStatus()
OutTrace("DescribePixelFormat ERROR: err=%d\n", GetLastError());
return;
}
memset(ColorMask, ' ', 32); // blank fill
ColorMask[32] = 0; // terminate
if ((pfd.cRedShift+pfd.cRedBits <= 32) &&
@ -600,6 +602,17 @@ RECT dxwCore::MapWindowRect(LPRECT lpRect)
ClientRect.top=ClientRect.left=ClientRect.right=ClientRect.bottom=0;
return ClientRect;
}
if(!Windowize){
if(lpRect)
RetRect=*lpRect;
else{
RetRect.left = RetRect.top = 0;
RetRect.right = dwScreenWidth;
RetRect.bottom = dwScreenHeight;
}
return RetRect;
}
RetRect=ClientRect;
bx = by = 0;

Binary file not shown.

View File

@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "dxwnd.h"
#include "dxwcore.hpp"
#define VERSION "2.02.89"
#define VERSION "2.02.90"
#define DDTHREADLOCK 1

Binary file not shown.

View File

@ -66,14 +66,16 @@ static HookEntry_Type RemapHooks[]={
{HOOK_IAT_CANDIDATE, "SetWindowOrgEx", (FARPROC)NULL, (FARPROC *)&pSetWindowOrgEx, (FARPROC)extSetWindowOrgEx},
{HOOK_IAT_CANDIDATE, "GetCurrentPositionEx", (FARPROC)NULL, (FARPROC *)&pGetCurrentPositionEx, (FARPROC)extGetCurrentPositionEx},
{HOOK_IAT_CANDIDATE, "SetDIBitsToDevice", (FARPROC)NULL, (FARPROC *)&pSetDIBitsToDevice, (FARPROC)extSetDIBitsToDevice}, // does the stretching
{HOOK_IAT_CANDIDATE, 0, NULL, 0, 0} // terminator
{HOOK_IAT_CANDIDATE, "GetRgnBox", (FARPROC)NULL, (FARPROC *)&pGetRgnBox, (FARPROC)extGetRgnBox},
//{HOOK_IAT_CANDIDATE, "GetRegionData", (FARPROC)NULL, (FARPROC *)&pGetRegionData, (FARPROC)extGetRegionData},
{HOOK_IAT_CANDIDATE, 0, NULL, 0, 0} // terminator
};
static HookEntry_Type ScaledHooks[]={
{HOOK_IAT_CANDIDATE, "Rectangle", (FARPROC)Rectangle, (FARPROC *)&pGDIRectangle, (FARPROC)extRectangle},
{HOOK_IAT_CANDIDATE, "TextOutA", (FARPROC)TextOutA, (FARPROC *)&pGDITextOutA, (FARPROC)extTextOutA},
{HOOK_IAT_CANDIDATE, "GetClipBox", (FARPROC)NULL, (FARPROC *)&pGDIGetClipBox, (FARPROC)extGetClipBox},
{HOOK_IAT_CANDIDATE, "GetRgnBox", (FARPROC)NULL, (FARPROC *)&pGDIGetRgnBox, (FARPROC)extGetRgnBox},
//{HOOK_IAT_CANDIDATE, "GetRgnBox", (FARPROC)NULL, (FARPROC *)&pGetRgnBox, (FARPROC)extGetRgnBox},
{HOOK_IAT_CANDIDATE, "Polyline", (FARPROC)NULL, (FARPROC *)&pPolyline, (FARPROC)extPolyline},
{HOOK_IAT_CANDIDATE, "PolyBezierTo", (FARPROC)NULL, (FARPROC *)&pPolyBezierTo, (FARPROC)extPolyBezierTo},
{HOOK_IAT_CANDIDATE, "PolylineTo", (FARPROC)NULL, (FARPROC *)&pPolylineTo, (FARPROC)extPolylineTo},
@ -1115,21 +1117,18 @@ int WINAPI extGetClipBox(HDC hdc, LPRECT lprc)
return ret;
}
int WINAPI extGetRgnBox(HDC hdc, LPRECT lprc)
int WINAPI extGetRgnBox(HRGN hrgn, LPRECT lprc)
{
int ret;
char *sRetCodes[4]={"ERROR", "NULLREGION", "SIMPLEREGION", "COMPLEXREGION"};
OutTraceDW("GetRgnBox: hdc=%x\n", hdc);
ret=(*pGDIGetRgnBox)(hdc, lprc);
if (dxw.IsFullScreen() && (OBJ_DC == GetObjectType(hdc)) && (ret!=ERROR)){
OutTraceDW("GetRgnBox: hrgn=%x\n", hrgn);
ret=(*pGetRgnBox)(hrgn, lprc);
if (dxw.IsFullScreen() && (OBJ_DC == GetObjectType(hrgn)) && (ret!=ERROR)){
OutTraceDW("GetRgnBox: scaling main win coordinates (%d,%d)-(%d,%d)\n",
lprc->left, lprc->top, lprc->right, lprc->bottom);
// current implementation is NOT accurate, since it always returns the whole
// virtual desktop area as the current regionbox...!!!
*lprc=dxw.GetScreenRect();
dxw.UnmapClient(lprc);
}
OutTraceDW("GetRgnBox: ret=%x(%s) rect=(%d,%d)-(%d,%d)\n",
ret, sRetCodes[ret], lprc->left, lprc->top, lprc->right, lprc->bottom);
ret, ExplainRegionType(ret), lprc->left, lprc->top, lprc->right, lprc->bottom);
return ret;
}
@ -1864,3 +1863,41 @@ BOOL WINAPI extExtTextOutW(HDC hdc, int X, int Y, UINT fuOptions, const RECT *lp
return (*pExtTextOutW)(hdc, X, Y, fuOptions, NULL, lpString, cbCount, lpDx);
}
#if 0
// unhooked, since quite surprisingly all rectangles showed properly scaled already in RollerCoaster Tycoon !!
DWORD WINAPI extGetRegionData(HRGN hRgn, DWORD dwCount, LPRGNDATA lpRgnData)
{
DWORD ret;
RECT *data;
ret=(*pGetRegionData)(hRgn, dwCount, lpRgnData);
if(IsDebug){
OutTrace("GetRegionData: hRgn=%x count=%d RgnData=%x ret=%d\n", hRgn, dwCount, lpRgnData, ret);
if(lpRgnData && dwCount){
OutTrace("GetRegionData: size=%d type=%x(%s) count=%d size=%d rect=(%d,%d)-(%d,%d)\n",
lpRgnData->rdh.dwSize, lpRgnData->rdh.iType, (lpRgnData->rdh.iType==RDH_RECTANGLES ? "RDH_RECTANGLES" : "unknown"),
lpRgnData->rdh.nCount, lpRgnData->rdh.nRgnSize,
lpRgnData->rdh.rcBound.left, lpRgnData->rdh.rcBound.top, lpRgnData->rdh.rcBound.right, lpRgnData->rdh.rcBound.bottom);
data=(RECT *)lpRgnData->Buffer;
for(DWORD i=0; i<lpRgnData->rdh.nCount; i++)
OutTrace("GetRegionData: item=%i rect=(%d,%d)-(%d,%d)\n", i, data[i].left, data[i].top, data[i].right, data[i].bottom);
}
}
if(dxw.IsFullScreen() && lpRgnData && dwCount){
dxw.UnmapClient(&(lpRgnData->rdh.rcBound));
data=(RECT *)lpRgnData->Buffer;
for(DWORD i=0; i<lpRgnData->rdh.nCount; i++) dxw.UnmapClient(&(data[i]));
if(IsDebug){
OutTrace("GetRegionData: FIXED rect=(%d,%d)-(%d,%d)\n",
lpRgnData->rdh.rcBound.left, lpRgnData->rdh.rcBound.top, lpRgnData->rdh.rcBound.right, lpRgnData->rdh.rcBound.bottom);
data=(RECT *)lpRgnData->Buffer;
for(DWORD i=0; i<lpRgnData->rdh.nCount; i++)
OutTrace("GetRegionData: FIXED item=%i rect=(%d,%d)-(%d,%d)\n",
i, data[i].left, data[i].top, data[i].right, data[i].bottom);
}
}
return ret;
}
#endif

View File

@ -1224,12 +1224,22 @@ HRESULT WINAPI extNextViewport2(void *d3dd, LPDIRECT3DVIEWPORT2 lpd3dvp, LPDIREC
return res;
}
HRESULT WINAPI extSetTexture3(void *, DWORD, LPDIRECT3DTEXTURE2)
HRESULT WINAPI extSetTexture3(void *d3dd, DWORD flags, LPDIRECT3DTEXTURE2 lptex)
{
return DD_OK;
HRESULT res;
if (dxw.dwFlags4 & NOTEXTURES) return DD_OK;
res=(*pSetTexture3)(d3dd, flags, lptex);
OutTraceD3D("SetTexture3: d3dd=%x, flags=%x, tex=%x res=%x\n", d3dd, flags, lptex, res);
return res;
}
HRESULT WINAPI extSetTexture7(void *, DWORD, LPDIRECTDRAWSURFACE7)
HRESULT WINAPI extSetTexture7(void *d3dd, DWORD flags, LPDIRECTDRAWSURFACE7 lptex)
{
return DD_OK;
HRESULT res;
if (dxw.dwFlags4 & NOTEXTURES) return DD_OK;
res=(*pSetTexture7)(d3dd, flags, lptex);
OutTraceD3D("SetTexture7: d3dd=%x, flags=%x, tex=%x res=%x\n", d3dd, flags, lptex, res);
return res;
}

View File

@ -22,6 +22,7 @@ static HookEntry_Type Hooks[]={
{HOOK_IAT_CANDIDATE, "LoadLibraryExW", (FARPROC)LoadLibraryExW, (FARPROC *)&pLoadLibraryExW, (FARPROC)extLoadLibraryExW},
{HOOK_IAT_CANDIDATE, "GetDriveTypeA", (FARPROC)NULL, (FARPROC *)&pGetDriveType, (FARPROC)extGetDriveType},
{HOOK_IAT_CANDIDATE, "GetLogicalDrives", (FARPROC)NULL, (FARPROC *)&pGetLogicalDrives, (FARPROC)extGetLogicalDrives},
{HOOK_IAT_CANDIDATE, "GetTempFileNameA", (FARPROC)GetTempFileNameA, (FARPROC *)&pGetTempFileName, (FARPROC)extGetTempFileName},
{HOOK_IAT_CANDIDATE, 0, NULL, 0, 0} // terminator
};
@ -488,6 +489,9 @@ FARPROC WINAPI extGetProcAddress(HMODULE hModule, LPCSTR proc)
case SYSLIBIDX_USER32:
if (remap=Remap_user32_ProcAddress(proc, hModule)) return remap;
break;
case SYSLIBIDX_GDI32:
if (remap=Remap_GDI32_ProcAddress(proc, hModule)) return remap;
break;
case SYSLIBIDX_KERNEL32:
if (remap=Remap_kernel32_ProcAddress(proc, hModule)) return remap;
break;
@ -734,3 +738,22 @@ BOOL WINAPI extCheckRemoteDebuggerPresent(HANDLE hProcess, PBOOL pbDebuggerPrese
OutTraceDW("CheckRemoteDebuggerPresent: hProcess=%x ret=%x\n", hProcess, ret);
return ret;
}
UINT WINAPI extGetTempFileName(LPCTSTR lpPathName, LPCTSTR lpPrefixString, UINT uUnique, LPTSTR lpTempFileName)
{
UINT ret;
OutTraceDW("GetTempFileName: PathName=\"%s\" PrefixString=%s Unique=%d\n", lpPathName, lpPrefixString, uUnique);
ret = (*pGetTempFileName)(lpPathName, lpPrefixString, uUnique, lpTempFileName);
if(ret == 0){
// GetTempFileName patch to make "Powerslide" working
OutTraceDW("GetTempFileName FAILED: error=%d at %d\n", GetLastError(), __LINE__);
char sTmpDir[MAX_PATH+1];
GetTempPath(sizeof(sTmpDir), sTmpDir);
ret = (*pGetTempFileName)(sTmpDir, lpPrefixString, uUnique, lpTempFileName);
if(ret == 0) OutTraceDW("GetTempFileName FAILED: PathName=\"%s\" error=%d line %d\n", sTmpDir, GetLastError(), __LINE__);
}
if(ret){
OutTraceDW("GetTempFileName: TempFileName=\"%s\" ret=%d\n", lpTempFileName, ret);
}
return ret;
}

View File

@ -45,7 +45,8 @@ typedef HPALETTE(WINAPI *GDICreatePalette_Type)(CONST LOGPALETTE *);
typedef HDWP (WINAPI *DeferWindowPos_Type)(HDWP, HWND, HWND, int, int, int, int, UINT);
typedef BOOL (WINAPI *DeleteDC_Type)(HDC);
typedef int (WINAPI *GetClipBox_Type)(HDC, LPRECT);
typedef int (WINAPI *GetRgnBox_Type)(HDC, LPRECT);
typedef int (WINAPI *GetRgnBox_Type)(HRGN, LPRECT);
typedef DWORD (WINAPI *GetRegionData_Type)(HRGN, DWORD, LPRGNDATA);
typedef int (WINAPI *GetDeviceCaps_Type)(HDC, int);
typedef BOOL (WINAPI *GetDeviceGammaRamp_Type)(HDC, LPVOID);
typedef BOOL (WINAPI *GetSystemPaletteEntries_Type)(HDC, UINT, UINT, LPPALETTEENTRY);
@ -104,6 +105,7 @@ typedef void (WINAPI *GetLocalTime_Type)(LPSYSTEMTIME);
typedef FARPROC (WINAPI *GetProcAddress_Type)(HMODULE, LPCSTR);
typedef void (WINAPI *GetSystemTime_Type)(LPSYSTEMTIME);
typedef void (WINAPI *GetSystemTimeAsFileTime_Type)(LPFILETIME);
typedef UINT (WINAPI *GetTempFileName_Type)(LPCTSTR, LPCTSTR, UINT, LPTSTR);
typedef DWORD (WINAPI *GetTickCount_Type)(void);
typedef DWORD (WINAPI *GetVersion_Type)(void);
typedef BOOL (WINAPI *GetVersionExA_Type)(LPOSVERSIONINFOA);
@ -255,7 +257,8 @@ DXWEXTERN GDICreatePalette_Type pGDICreatePalette DXWINITIALIZED;
DXWEXTERN DeferWindowPos_Type pGDIDeferWindowPos DXWINITIALIZED;
DXWEXTERN DeleteDC_Type pGDIDeleteDC DXWINITIALIZED;
DXWEXTERN GetClipBox_Type pGDIGetClipBox DXWINITIALIZED;
DXWEXTERN GetRgnBox_Type pGDIGetRgnBox DXWINITIALIZED;
DXWEXTERN GetRgnBox_Type pGetRgnBox DXWINITIALIZED;
DXWEXTERN GetRegionData_Type pGetRegionData DXWINITIALIZED;
DXWEXTERN GetDeviceCaps_Type pGDIGetDeviceCaps DXWINITIALIZED;
DXWEXTERN GetDeviceGammaRamp_Type pGDIGetDeviceGammaRamp DXWINITIALIZED;
DXWEXTERN GetSystemPaletteEntries_Type pGDIGetSystemPaletteEntries DXWINITIALIZED;
@ -317,6 +320,7 @@ DXWEXTERN GetLocalTime_Type pGetLocalTime DXWINITIALIZED;
DXWEXTERN GetProcAddress_Type pGetProcAddress DXWINITIALIZED;
DXWEXTERN GetSystemTime_Type pGetSystemTime DXWINITIALIZED;
DXWEXTERN GetSystemTimeAsFileTime_Type pGetSystemTimeAsFileTime DXWINITIALIZED;
DXWEXTERN GetTempFileName_Type pGetTempFileName DXWINITIALIZED;
DXWEXTERN GetTickCount_Type pGetTickCount DXWINITIALIZED;
DXWEXTERN GetVersion_Type pGetVersion DXWINITIALIZED;
DXWEXTERN GetVersionExA_Type pGetVersionExA DXWINITIALIZED;
@ -460,7 +464,8 @@ extern HDWP WINAPI extDeferWindowPos(HDWP, HWND, HWND, int, int, int, int, UINT)
extern BOOL WINAPI extGDIDeleteDC(HDC);
extern BOOL WINAPI extDDDeleteDC(HDC);
extern int WINAPI extGetClipBox(HDC, LPRECT);
extern int WINAPI extGetRgnBox(HDC, LPRECT);
extern int WINAPI extGetRgnBox(HRGN, LPRECT);
extern DWORD WINAPI extGetRegionData(HRGN, DWORD, LPRGNDATA);
extern int WINAPI extGetDeviceCaps(HDC, int);
extern BOOL WINAPI extGetDeviceGammaRamp(HDC, LPVOID);
extern UINT WINAPI extGetSystemPaletteEntries(HDC, UINT, UINT, LPPALETTEENTRY);
@ -522,6 +527,7 @@ extern void WINAPI extGetLocalTime(LPSYSTEMTIME);
extern FARPROC WINAPI extGetProcAddress(HMODULE, LPCSTR);
extern void WINAPI extGetSystemTime(LPSYSTEMTIME);
extern void WINAPI extGetSystemTimeAsFileTime(LPFILETIME);
extern UINT WINAPI extGetTempFileName(LPCTSTR, LPCTSTR, UINT, LPTSTR);
extern DWORD WINAPI extGetTickCount(void);
extern DWORD WINAPI extGetVersion(void);
extern BOOL WINAPI extGetVersionExA(LPOSVERSIONINFOA);

View File

@ -16,6 +16,10 @@
BOOL IsChangeDisplaySettingsHotPatched = FALSE;
//typedef BOOL (WINAPI *ValidateRect_Type)(HWND, const RECT *);
//BOOL WINAPI extValidateRect(HWND, const RECT *);
//ValidateRect_Type pValidateRect = NULL;
static HookEntry_Type Hooks[]={
{HOOK_IAT_CANDIDATE, "UpdateWindow", (FARPROC)NULL, (FARPROC *)&pUpdateWindow, (FARPROC)extUpdateWindow},
//{HOOK_IAT_CANDIDATE, "GetWindowPlacement", (FARPROC)NULL, (FARPROC *)&pGetWindowPlacement, (FARPROC)extGetWindowPlacement},
@ -99,6 +103,7 @@ static HookEntry_Type ScaledHooks[]={
{HOOK_IAT_CANDIDATE, "GetWindowDC", (FARPROC)GetWindowDC, (FARPROC *)&pGDIGetWindowDC, (FARPROC)extGDIGetWindowDC},
{HOOK_IAT_CANDIDATE, "ReleaseDC", (FARPROC)ReleaseDC, (FARPROC *)&pGDIReleaseDC, (FARPROC)extGDIReleaseDC},
{HOOK_IAT_CANDIDATE, "InvalidateRect", (FARPROC)InvalidateRect, (FARPROC *)&pInvalidateRect, (FARPROC)extInvalidateRect},
//{HOOK_IAT_CANDIDATE, "ValidateRect", (FARPROC)ValidateRect, (FARPROC *)&pValidateRect, (FARPROC)extValidateRect},
{HOOK_IAT_CANDIDATE, 0, NULL, 0, 0} // terminator
};
@ -479,7 +484,7 @@ static LRESULT WINAPI FixWindowProc(char *ApiName, HWND hwnd, UINT Msg, WPARAM w
default:
break;
}
// marker to run hooked function
return(-1);
}
@ -537,18 +542,18 @@ BOOL WINAPI extShowWindow(HWND hwnd, int nCmdShow)
return res;
}
LONG WINAPI extGetWindowLong(HWND hwnd, int nIndex, GetWindowLong_Type pGetWindowLong)
LONG WINAPI extGetWindowLong(GetWindowLong_Type pGetWindowLong, char *ApiName, HWND hwnd, int nIndex)
{
LONG res;
res=(*pGetWindowLongA)(hwnd, nIndex);
res=(*pGetWindowLong)(hwnd, nIndex);
OutTraceDW("GetWindowLong: hwnd=%x, Index=%x(%s) res=%x\n", hwnd, nIndex, ExplainSetWindowIndex(nIndex), res);
OutTraceDW("%s: hwnd=%x, Index=%x(%s) res=%x\n", ApiName, hwnd, nIndex, ExplainSetWindowIndex(nIndex), res);
if((nIndex==GWL_WNDPROC)||(nIndex==DWL_DLGPROC)){
WNDPROC wp;
wp=WinDBGetProc(hwnd);
OutTraceDW("GetWindowLong: remapping WindowProc res=%x -> %x\n", res, (LONG)wp);
OutTraceDW("%s: remapping WindowProc res=%x -> %x\n", ApiName, res, (LONG)wp);
if(wp) res=(LONG)wp; // if not found, don't alter the value.
}
@ -557,12 +562,12 @@ LONG WINAPI extGetWindowLong(HWND hwnd, int nIndex, GetWindowLong_Type pGetWindo
LONG WINAPI extGetWindowLongA(HWND hwnd, int nIndex)
{
return extGetWindowLong(hwnd, nIndex, pGetWindowLongA);
return extGetWindowLong(pGetWindowLongA, "GetWindowLongA", hwnd, nIndex);
}
LONG WINAPI extGetWindowLongW(HWND hwnd, int nIndex)
{
return extGetWindowLong(hwnd, nIndex, pGetWindowLongW);
return extGetWindowLong(pGetWindowLongW, "GetWindowLongW", hwnd, nIndex);
}
LONG WINAPI extSetWindowLong(HWND hwnd, int nIndex, LONG dwNewLong, SetWindowLong_Type pSetWindowLong)
@ -917,8 +922,8 @@ BOOL WINAPI extClientToScreen(HWND hwnd, LPPOINT lppoint)
// should always keep the same values inaltered
if(hwnd != dxw.GethWnd()){
*lppoint = dxw.AddCoordinates(*lppoint, dxw.ClientOffset(hwnd));
OutTraceB("ClientToScreen: FIXED point=(%d,%d)\n", lppoint->x, lppoint->y);
}
OutTraceB("ClientToScreen: FIXED point=(%d,%d)\n", lppoint->x, lppoint->y);
res=TRUE;
}
else {
@ -1490,8 +1495,8 @@ LRESULT WINAPI extDefWindowProcA(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lPar
// v2.02.30: fix (Imperialism II): apply to main window only !!!
HRESULT res;
res = -1;
if(hwnd == dxw.GethWnd()) res=FixWindowProc("DefWindowProc", hwnd, Msg, wParam, &lParam);
res = (HRESULT)-1;
if(hwnd == dxw.GethWnd()) res=FixWindowProc("DefWindowProcA", hwnd, Msg, wParam, &lParam);
if (res==(HRESULT)-1)
return (*pDefWindowProcA)(hwnd, Msg, wParam, lParam);
@ -1504,8 +1509,8 @@ LRESULT WINAPI extDefWindowProcW(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lPar
// v2.02.30: fix (Imperialism II): apply to main window only !!!
HRESULT res;
res = -1;
if(hwnd == dxw.GethWnd()) res=FixWindowProc("DefWindowProc", hwnd, Msg, wParam, &lParam);
res = (HRESULT)-1;
if(hwnd == dxw.GethWnd()) res=FixWindowProc("DefWindowProcW", hwnd, Msg, wParam, &lParam);
if (res==(HRESULT)-1)
return (*pDefWindowProcW)(hwnd, Msg, wParam, lParam);
@ -2732,18 +2737,59 @@ BOOL WINAPI extGetMonitorInfoW(HMONITOR hMonitor, LPMONITORINFO lpmi)
int WINAPI extGetUpdateRgn(HWND hWnd, HRGN hRgn, BOOL bErase)
{
int regionType;
RECT rc;
regionType=(*pGetUpdateRgn)(hWnd, hRgn, bErase);
if( regionType == SIMPLEREGION ){
regionType = GetRgnBox( hRgn, &rc );
if( regionType == SIMPLEREGION ){
dxw.UnmapClient(&rc);
if( SetRectRgn( hRgn, rc.left, rc.top, rc.right, rc.bottom ) ){
// success
OutTraceDW("GetUpdateRgn: hwnd=%x hrgn=%x update rgn=(%d,%d)-(%d,%d) erase=%x\n",
hWnd, hRgn, rc.left, rc.top, rc.right, rc.bottom, bErase);
}
}
}
return regionType;
}
OutTraceDW("GetUpdateRgn: hwnd=%x hrgn=%x erase=%x regionType=%x(%s)\n",
hWnd, hRgn, bErase, regionType, ExplainRegionType(regionType));
if(dxw.Windowize && dxw.IsFullScreen()){
if(regionType == SIMPLEREGION){
RECT rc;
if(!pGetRgnBox) pGetRgnBox=GetRgnBox;
regionType = (*pGetRgnBox)(hRgn, &rc);
OutTraceDW("GetUpdateRgn: regionType=%x(%s) box=(%d,%d)-(%d,%d)\n",
regionType, ExplainRegionType(regionType), rc.left, rc.top, rc.right, rc.bottom);
if(regionType == SIMPLEREGION){
dxw.UnmapClient(&rc);
if(SetRectRgn(hRgn, rc.left, rc.top, rc.right, rc.bottom )){
// success
OutTraceDW("GetUpdateRgn: FIXED box=(%d,%d)-(%d,%d)\n", rc.left, rc.top, rc.right, rc.bottom);
}
}
}
#if 0
if(regionType == COMPLEXREGION){
RECT rc;
if(!pGetRgnBox) pGetRgnBox=GetRgnBox;
regionType = (*pGetRgnBox)(hRgn, &rc);
OutTraceDW("GetUpdateRgn: regionType=%x(%s) box=(%d,%d)-(%d,%d)\n",
regionType, ExplainRegionType(regionType), rc.left, rc.top, rc.right, rc.bottom);
if(regionType == COMPLEXREGION){
//dxw.UnmapClient(&rc);
//if(SetRectRgn(hRgn, rc.left, rc.top, rc.right, rc.bottom )){
if(SetRectRgn(hRgn, 0, 0, dxw.GetScreenWidth(), dxw.GetScreenHeight())){
// success
OutTraceDW("GetUpdateRgn: FIXED box=(%d,%d)-(%d,%d)\n", rc.left, rc.top, rc.right, rc.bottom);
}
}
}
#endif
}
return regionType;
}
#ifdef NOUNHOOKED
BOOL WINAPI extValidateRect(HWND hWnd, const RECT *lpRect)
{
BOOL ret;
if(IsTraceDW){
if(lpRect)
OutTrace("ValidateRect: hwnd=%x rect=(%d,%d)-(%d,%d)\n",
hWnd, lpRect->left, lpRect->top, lpRect->right, lpRect->bottom);
else
OutTrace("ValidateRect: hwnd=%x rect=NULL\n", hWnd);
}
ret = (*pValidateRect)(hWnd, lpRect);
return ret;
}
#endif

Binary file not shown.

View File

@ -31,7 +31,6 @@ void CTabDebug::DoDataExchange(CDataExchange* pDX)
DDX_Check(pDX, IDC_YUV2RGB, cTarget->m_ForceYUVtoRGB);
DDX_Check(pDX, IDC_DXPROXED, cTarget->m_DXProxed);
DDX_Check(pDX, IDC_ASSERT, cTarget->m_AssertDialog);
DDX_Check(pDX, IDC_FULLRECTBLT, cTarget->m_FullRectBlt);
DDX_Check(pDX, IDC_MARKBLIT, cTarget->m_MarkBlit);
DDX_Check(pDX, IDC_ANALYTICMODE, cTarget->m_AnalyticMode);
DDX_Check(pDX, IDC_SURFACEWARN, cTarget->m_SurfaceWarn);

View File

@ -46,6 +46,7 @@ void CTabDirectX::DoDataExchange(CDataExchange* pDX)
DDX_Check(pDX, IDC_RETURNNULLREF, cTarget->m_ReturnNullRef);
DDX_Check(pDX, IDC_NOD3DRESET, cTarget->m_NoD3DReset);
DDX_Check(pDX, IDC_NOFLIPEMULATION, cTarget->m_NoFlipEmulation);
DDX_Check(pDX, IDC_FULLRECTBLT, cTarget->m_FullRectBlt);
}
BEGIN_MESSAGE_MAP(CTabDirectX, CDialog)

View File

@ -50,6 +50,7 @@ void CTabInput::DoDataExchange(CDataExchange* pDX)
// Message processing
DDX_Check(pDX, IDC_FILTERMESSAGES, cTarget->m_FilterMessages);
DDX_Check(pDX, IDC_PEEKALLMESSAGES, cTarget->m_PeekAllMessages);
DDX_Check(pDX, IDC_NOWINPOSCHANGES, cTarget->m_NoWinPosChanges);
// Keyboard handling
DDX_Check(pDX, IDC_ENABLEHOTKEYS, cTarget->m_EnableHotKeys);
DDX_Check(pDX, IDC_HANDLEALTF4, cTarget->m_HandleAltF4);

View File

@ -79,6 +79,7 @@ CTargetDlg::CTargetDlg(CWnd* pParent /*=NULL*/)
m_FullScreenOnly = FALSE;
m_FilterMessages = FALSE;
m_PeekAllMessages = FALSE;
m_NoWinPosChanges = FALSE;
m_NoBanner = FALSE;
m_StartDebug = FALSE;
m_FilePath = _T("");

View File

@ -54,6 +54,7 @@ public:
BOOL m_FullScreenOnly;
BOOL m_FilterMessages;
BOOL m_PeekAllMessages;
BOOL m_NoWinPosChanges;
BOOL m_NoBanner;
BOOL m_StartDebug;
BOOL m_HookEnabled;

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
host/dxwndhost.rc.txt Normal file

Binary file not shown.

Binary file not shown.

View File

@ -123,6 +123,7 @@ static void SetTargetFromDlg(TARGETMAP *t, CTargetDlg *dlg)
if(dlg->m_FullScreenOnly) t->flags3 |= FULLSCREENONLY;
if(dlg->m_FilterMessages) t->flags3 |= FILTERMESSAGES;
if(dlg->m_PeekAllMessages) t->flags3 |= PEEKALLMESSAGES;
if(dlg->m_NoWinPosChanges) t->flags5 |= NOWINPOSCHANGES;
t->flags &= ~EMULATEFLAGS;
switch(dlg->m_DxEmulationMode){
@ -307,6 +308,7 @@ static void SetDlgFromTarget(TARGETMAP *t, CTargetDlg *dlg)
dlg->m_FullScreenOnly = t->flags3 & FULLSCREENONLY ? 1 : 0;
dlg->m_FilterMessages = t->flags3 & FILTERMESSAGES ? 1 : 0;
dlg->m_PeekAllMessages = t->flags3 & PEEKALLMESSAGES ? 1 : 0;
dlg->m_NoWinPosChanges = t->flags5 & NOWINPOSCHANGES ? 1 : 0;
dlg->m_DxEmulationMode = 0;
dlg->m_BilinearFilter = FALSE;
@ -675,7 +677,6 @@ static int LoadConfigItem(TARGETMAP *TargetMap, PRIVATEMAP *PrivateMap, int i, c
if (!gbDebug){
// clear debug flags
TargetMap->flags &= ~(0);
TargetMap->flags2 &= ~(FULLRECTBLT);
TargetMap->flags3 &= ~(YUV2RGB|RGB2YUV|SURFACEWARN|ANALYTICMODE|NODDRAWBLT|NODDRAWFLIP|NOGDIBLT);
TargetMap->flags4 &= ~(NOFILLRECT);
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.