mirror of
https://github.com/DxWnd/DxWnd.reloaded
synced 2024-12-30 09:25:35 +01:00
v2_03_60_src
Former-commit-id: 24ef75f92ead3d9ea0b1a6c8e13290f0e352eed1
This commit is contained in:
parent
fc2d6f47ff
commit
59d70d43db
@ -97,7 +97,7 @@
|
||||
#define GDIEMULATEDC 0x00008000 // Map GDI/user32 calls to primary to a memory surface to be stretch-blitted to the primary
|
||||
#define FULLSCREENONLY 0x00010000 // assume that the program is always in fullscreen mode
|
||||
#define FONTBYPASS 0x00020000 // bypass font unsupported API
|
||||
//#define YUV2RGB 0x00040000 // Simulate YUV to RGB color conversion
|
||||
#define MINIMALCAPS 0x00040000 // Simulate minimal HW caps (copied from VMWare virtual screen)
|
||||
#define DEFAULTMESSAGES 0x00080000 // peocess offending messages that are typical of a window with default action
|
||||
#define BUFFEREDIOFIX 0x00100000 // fix buffered IO incompatibilities between pre-Win98 and post-WinNT
|
||||
#define FILTERMESSAGES 0x00200000 // ignore offending messages that are typical of a window and are hot handled by a fullscreeen app
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5a1ab8f9170fce5bf01058d18f19fba15c7014eb872a8e7a2ec36f4e2ea399bc
|
||||
size 628736
|
||||
oid sha256:d9ac1cecea05e3987a704ea216ebfd79278c9f38a36182164400643fb9e2e1f2
|
||||
size 635392
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9f7c9d1fe78caeb4054e32420034aba59350b965fb86959352d22a1a46a32ea8
|
||||
oid sha256:11ea6c6d9b9ff87c162d3aad1c917218d5385f076c45bac305777a949fa9e331
|
||||
size 555520
|
||||
|
316
build/dxwnd.ini
Normal file
316
build/dxwnd.ini
Normal file
@ -0,0 +1,316 @@
|
||||
[window]
|
||||
posx=50
|
||||
posy=50
|
||||
sizx=320
|
||||
sizy=200
|
||||
exportpath=D:\DxWnd\v2_03_60_src\build\exports\
|
||||
exepath=D:\Games\Warhammer 40K - Rites of War RIP\
|
||||
[target]
|
||||
title0=Imperialism
|
||||
path0=D:\Games\Imperialism\Imperialism.exe
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
notes0=
|
||||
registry0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=1744839201
|
||||
flagg0=671088640
|
||||
flagh0=32788
|
||||
flagi0=4194308
|
||||
flagj0=0
|
||||
flagk0=0
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
tflag0=6466
|
||||
posx0=50
|
||||
posy0=50
|
||||
sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
swapeffect0=0
|
||||
maxddinterface0=7
|
||||
title1=\Warhammer 40K - Rites of War
|
||||
path1=D:\Games\Warhammer 40K - Rites of War RIP\row.exe
|
||||
launchpath1=
|
||||
module1=
|
||||
opengllib1=
|
||||
notes1=
|
||||
registry1=
|
||||
ver1=0
|
||||
coord1=0
|
||||
flag1=153092128
|
||||
flagg1=1207959552
|
||||
flagh1=20
|
||||
flagi1=138543108
|
||||
flagj1=4224
|
||||
flagk1=65536
|
||||
flagl1=0
|
||||
flagm1=0
|
||||
tflag1=-2147477245
|
||||
posx1=50
|
||||
posy1=50
|
||||
sizx1=800
|
||||
sizy1=600
|
||||
maxfps1=0
|
||||
initts1=0
|
||||
winver1=0
|
||||
maxres1=-1
|
||||
swapeffect1=0
|
||||
maxddinterface1=7
|
||||
title2=Runaway
|
||||
path2=D:\Games\MVM 2004 - Runaway\Runaway.exe
|
||||
launchpath2=
|
||||
module2=
|
||||
opengllib2=
|
||||
notes2=
|
||||
registry2=
|
||||
ver2=0
|
||||
coord2=0
|
||||
flag2=136314912
|
||||
flagg2=1207959552
|
||||
flagh2=20
|
||||
flagi2=138412038
|
||||
flagj2=266368
|
||||
flagk2=65536
|
||||
flagl2=0
|
||||
flagm2=0
|
||||
tflag2=0
|
||||
posx2=50
|
||||
posy2=50
|
||||
sizx2=800
|
||||
sizy2=600
|
||||
maxfps2=0
|
||||
initts2=0
|
||||
winver2=0
|
||||
maxres2=-1
|
||||
swapeffect2=0
|
||||
maxddinterface2=7
|
||||
title3=Betrayal in Antara
|
||||
path3=D:\Games\Betrayal in Antara\ANTARAR.EXE
|
||||
launchpath3=
|
||||
module3=
|
||||
opengllib3=
|
||||
notes3=
|
||||
registry3=
|
||||
ver3=0
|
||||
coord3=0
|
||||
flag3=681574434
|
||||
flagg3=1207959552
|
||||
flagh3=20
|
||||
flagi3=138412036
|
||||
flagj3=4224
|
||||
flagk3=65536
|
||||
flagl3=0
|
||||
flagm3=0
|
||||
tflag3=0
|
||||
posx3=50
|
||||
posy3=50
|
||||
sizx3=800
|
||||
sizy3=600
|
||||
maxfps3=0
|
||||
initts3=0
|
||||
winver3=0
|
||||
maxres3=-1
|
||||
swapeffect3=0
|
||||
maxddinterface3=7
|
||||
title4=Blood 2 the Chosen
|
||||
path4=D:\Games\Blood2\CLIENT.EXE
|
||||
launchpath4=D:\Games\Blood2\BLOOD2.EXE
|
||||
module4=
|
||||
opengllib4=
|
||||
notes4=
|
||||
registry4=
|
||||
ver4=0
|
||||
coord4=0
|
||||
flag4=136315042
|
||||
flagg4=1207959552
|
||||
flagh4=20
|
||||
flagi4=138412036
|
||||
flagj4=4224
|
||||
flagk4=65536
|
||||
flagl4=0
|
||||
flagm4=0
|
||||
tflag4=0
|
||||
posx4=50
|
||||
posy4=50
|
||||
sizx4=1200
|
||||
sizy4=900
|
||||
maxfps4=0
|
||||
initts4=0
|
||||
winver4=0
|
||||
maxres4=-1
|
||||
swapeffect4=0
|
||||
maxddinterface4=7
|
||||
title5=Bugs Bunny Lost In Time
|
||||
path5=D:\Games\Bugs.Bunny.Lost.In.Time\bin\bugs.exe
|
||||
launchpath5=
|
||||
module5=
|
||||
opengllib5=
|
||||
notes5=
|
||||
registry5=
|
||||
ver5=7
|
||||
coord5=0
|
||||
flag5=681574434
|
||||
flagg5=1209139200
|
||||
flagh5=20
|
||||
flagi5=138412036
|
||||
flagj5=4224
|
||||
flagk5=98304
|
||||
flagl5=0
|
||||
flagm5=0
|
||||
tflag5=0
|
||||
posx5=50
|
||||
posy5=50
|
||||
sizx5=800
|
||||
sizy5=600
|
||||
maxfps5=0
|
||||
initts5=0
|
||||
winver5=0
|
||||
maxres5=-1
|
||||
swapeffect5=0
|
||||
maxddinterface5=7
|
||||
title6=Microsoft Golf '98 trial (win)
|
||||
path6=D:\Games\MSGolf98\MSGOLF98\GAME.EXE
|
||||
launchpath6=
|
||||
module6=
|
||||
opengllib6=
|
||||
notes6=
|
||||
registry6=[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft]\n[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games]\n[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Golf '98]\n[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Golf '98\Version 1.0 Demo]\n"AppPath"="D:\\Games\\MSGolf98\\MSGOLF98"\n"InstallType"="1"\n"InstallPath"="D:\\Games\\MSGolf98\\MSGOLF98\\"\n"CDPath"="D:\\Games\\MSGolf98\\MSGOLF98"\n"Launched"="1"\n"PID"=""\n"Path"="D:\\Games\\MSGolf98\\MSGOLF98"\n"VersionType"="TrialVersion"\n"InstalledGroup"="1"\n"LangID"=dword:00000009\n
|
||||
ver6=0
|
||||
coord6=0
|
||||
flag6=136314914
|
||||
flagg6=-671088640
|
||||
flagh6=1302
|
||||
flagi6=1212547076
|
||||
flagj6=4224
|
||||
flagk6=67436544
|
||||
flagl6=4
|
||||
flagm6=0
|
||||
tflag6=0
|
||||
posx6=50
|
||||
posy6=50
|
||||
sizx6=0
|
||||
sizy6=0
|
||||
maxfps6=0
|
||||
initts6=0
|
||||
winver6=0
|
||||
maxres6=-1
|
||||
swapeffect6=0
|
||||
maxddinterface6=7
|
||||
title7=No Respect (1.1)
|
||||
path7=D:\Games\No Respect\nr11.exe
|
||||
launchpath7=
|
||||
module7=
|
||||
opengllib7=
|
||||
notes7=
|
||||
registry7=
|
||||
ver7=0
|
||||
coord7=0
|
||||
flag7=681574434
|
||||
flagg7=1207959552
|
||||
flagh7=20
|
||||
flagi7=138412036
|
||||
flagj7=4224
|
||||
flagk7=327680
|
||||
flagl7=0
|
||||
flagm7=0
|
||||
tflag7=0
|
||||
posx7=50
|
||||
posy7=50
|
||||
sizx7=800
|
||||
sizy7=600
|
||||
maxfps7=0
|
||||
initts7=0
|
||||
winver7=0
|
||||
maxres7=-1
|
||||
swapeffect7=0
|
||||
maxddinterface7=7
|
||||
title8=No Respect
|
||||
path8=D:\Games\No Respect\NR.EXE
|
||||
launchpath8=
|
||||
module8=
|
||||
opengllib8=
|
||||
notes8=
|
||||
registry8=
|
||||
ver8=0
|
||||
coord8=0
|
||||
flag8=136314914
|
||||
flagg8=1207959552
|
||||
flagh8=20
|
||||
flagi8=138412036
|
||||
flagj8=4224
|
||||
flagk8=327680
|
||||
flagl8=0
|
||||
flagm8=0
|
||||
tflag8=0
|
||||
posx8=50
|
||||
posy8=50
|
||||
sizx8=800
|
||||
sizy8=600
|
||||
maxfps8=0
|
||||
initts8=0
|
||||
winver8=0
|
||||
maxres8=-1
|
||||
swapeffect8=0
|
||||
maxddinterface8=7
|
||||
title9=Phantasmagoria 2
|
||||
path9=D:\Games\Phantasmagoria 2\SIERRAW.EXE
|
||||
launchpath9=
|
||||
module9=
|
||||
opengllib9=
|
||||
notes9=
|
||||
registry9=
|
||||
ver9=0
|
||||
coord9=0
|
||||
flag9=681574434
|
||||
flagg9=1207959552
|
||||
flagh9=20
|
||||
flagi9=138412036
|
||||
flagj9=4224
|
||||
flagk9=65536
|
||||
flagl9=0
|
||||
flagm9=0
|
||||
tflag9=0
|
||||
posx9=50
|
||||
posy9=50
|
||||
sizx9=800
|
||||
sizy9=600
|
||||
maxfps9=0
|
||||
initts9=0
|
||||
winver9=0
|
||||
maxres9=-1
|
||||
swapeffect9=0
|
||||
maxddinterface9=7
|
||||
title10=Silver
|
||||
path10=D:\Games\Silver\silver.exe
|
||||
launchpath10=
|
||||
module10=
|
||||
opengllib10=
|
||||
notes10=
|
||||
registry10=
|
||||
ver10=0
|
||||
coord10=0
|
||||
flag10=136314998
|
||||
flagg10=1207959552
|
||||
flagh10=20
|
||||
flagi10=138412036
|
||||
flagj10=4224
|
||||
flagk10=268500992
|
||||
flagl10=0
|
||||
flagm10=0
|
||||
tflag10=0
|
||||
posx10=50
|
||||
posy10=50
|
||||
sizx10=800
|
||||
sizy10=600
|
||||
maxfps10=0
|
||||
initts10=0
|
||||
winver10=0
|
||||
maxres10=-1
|
||||
swapeffect10=0
|
||||
maxddinterface10=7
|
14
build/dxwnd.reg
Normal file
14
build/dxwnd.reg
Normal file
@ -0,0 +1,14 @@
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft]
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games]
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Golf '98]
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Golf '98\Version 1.0 Demo]
|
||||
"AppPath"="D:\\Games\\MSGolf98\\MSGOLF98"
|
||||
"InstallType"="1"
|
||||
"InstallPath"="D:\\Games\\MSGolf98\\MSGOLF98\\"
|
||||
"CDPath"="D:\\Games\\MSGolf98\\MSGOLF98"
|
||||
"Launched"="1"
|
||||
"PID"=""
|
||||
"Path"="D:\\Games\\MSGolf98\\MSGOLF98"
|
||||
"VersionType"="TrialVersion"
|
||||
"InstalledGroup"="1"
|
||||
"LangID"=dword:00000009
|
@ -26,3 +26,10 @@ launchpath0=
|
||||
winver0=0
|
||||
maxres0=0
|
||||
flagj0=128
|
||||
notes0=
|
||||
registry0=
|
||||
flagk0=65536
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
swapeffect0=0
|
||||
maxddinterface0=7
|
||||
|
@ -10,9 +10,9 @@ coord0=0
|
||||
flag0=134217762
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=134217732
|
||||
flagi0=138412036
|
||||
flagj0=4224
|
||||
flagk0=0
|
||||
flagk0=32768
|
||||
tflag0=0
|
||||
initx0=0
|
||||
inity0=0
|
||||
@ -29,3 +29,7 @@ initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
swapeffect0=0
|
||||
registry0=
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
maxddinterface0=7
|
||||
|
@ -25,7 +25,11 @@ initts0=0
|
||||
launchpath0=
|
||||
notes0=
|
||||
flagj0=128
|
||||
flagk0=0
|
||||
flagk0=65536
|
||||
winver0=0
|
||||
maxres0=0
|
||||
swapeffect0=0
|
||||
registry0=
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
maxddinterface0=7
|
||||
|
@ -25,7 +25,11 @@ initts0=0
|
||||
launchpath0=
|
||||
notes0=
|
||||
flagj0=128
|
||||
flagk0=0
|
||||
flagk0=65536
|
||||
winver0=0
|
||||
maxres0=0
|
||||
swapeffect0=0
|
||||
registry0=
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
maxddinterface0=7
|
||||
|
@ -8,10 +8,10 @@ notes0=
|
||||
registry0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=136314918
|
||||
flag0=136331302
|
||||
flagg0=1207959552
|
||||
flagh0=65552
|
||||
flagi0=138412036
|
||||
flagi0=138936320
|
||||
flagj0=4224
|
||||
flagk0=65536
|
||||
tflag0=0
|
||||
@ -30,3 +30,6 @@ initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
swapeffect0=0
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
maxddinterface0=7
|
||||
|
@ -12,7 +12,7 @@ flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=138412036
|
||||
flagj0=4224
|
||||
flagk0=0
|
||||
flagk0=32768
|
||||
tflag0=0
|
||||
initx0=0
|
||||
inity0=0
|
||||
@ -29,3 +29,7 @@ initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
swapeffect0=0
|
||||
registry0=
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
maxddinterface0=7
|
||||
|
29
build/exports/Betrayal in Antara.dxw
Normal file
29
build/exports/Betrayal in Antara.dxw
Normal file
@ -0,0 +1,29 @@
|
||||
[target]
|
||||
title0=Betrayal in Antara
|
||||
path0=D:\Games\Betrayal in Antara\ANTARAR.EXE
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
notes0=
|
||||
registry0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=681574434
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=138412036
|
||||
flagj0=4224
|
||||
flagk0=65536
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
tflag0=0
|
||||
posx0=50
|
||||
posy0=50
|
||||
sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
swapeffect0=0
|
||||
maxddinterface0=7
|
@ -12,8 +12,8 @@ flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=4325380
|
||||
flagj0=128
|
||||
flagk0=0
|
||||
tflag0=6210
|
||||
flagk0=65536
|
||||
tflag0=0
|
||||
initx0=0
|
||||
inity0=0
|
||||
minx0=0
|
||||
@ -29,3 +29,7 @@ initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
swapeffect0=0
|
||||
registry0=
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
maxddinterface0=7
|
||||
|
29
build/exports/Blood 2 the Chosen.dxw
Normal file
29
build/exports/Blood 2 the Chosen.dxw
Normal file
@ -0,0 +1,29 @@
|
||||
[target]
|
||||
title0=Blood 2 the Chosen
|
||||
path0=D:\Games\Blood2\CLIENT.EXE
|
||||
launchpath0=D:\Games\Blood2\BLOOD2.EXE
|
||||
module0=
|
||||
opengllib0=
|
||||
notes0=
|
||||
registry0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=136315042
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=138412036
|
||||
flagj0=4224
|
||||
flagk0=65536
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
tflag0=0
|
||||
posx0=50
|
||||
posy0=50
|
||||
sizx0=1200
|
||||
sizy0=900
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
swapeffect0=0
|
||||
maxddinterface0=7
|
29
build/exports/Bugs Bunny Lost In Time.dxw
Normal file
29
build/exports/Bugs Bunny Lost In Time.dxw
Normal file
@ -0,0 +1,29 @@
|
||||
[target]
|
||||
title0=Bugs Bunny Lost In Time
|
||||
path0=D:\Games\Bugs.Bunny.Lost.In.Time\bin\bugs.exe
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
notes0=
|
||||
registry0=
|
||||
ver0=7
|
||||
coord0=0
|
||||
flag0=681574434
|
||||
flagg0=1209139200
|
||||
flagh0=20
|
||||
flagi0=138412036
|
||||
flagj0=4224
|
||||
flagk0=98304
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
tflag0=0
|
||||
posx0=50
|
||||
posy0=50
|
||||
sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
swapeffect0=0
|
||||
maxddinterface0=7
|
@ -27,3 +27,9 @@ maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
registry0=
|
||||
flagk0=32768
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
swapeffect0=0
|
||||
maxddinterface0=7
|
||||
|
@ -12,7 +12,7 @@ flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=138412036
|
||||
flagj0=4224
|
||||
tflag0=512
|
||||
tflag0=0
|
||||
initx0=0
|
||||
inity0=0
|
||||
minx0=0
|
||||
@ -27,3 +27,9 @@ maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
registry0=
|
||||
flagk0=32768
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
swapeffect0=0
|
||||
maxddinterface0=7
|
||||
|
29
build/exports/Chaos Island (rip).dxw
Normal file
29
build/exports/Chaos Island (rip).dxw
Normal file
@ -0,0 +1,29 @@
|
||||
[target]
|
||||
title0=Chaos Island (RIP)
|
||||
path0=D:\Games\Chaos Island\CIsland.exe
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
notes0=Needs proper registry emulation file
|
||||
registry0=[HKEY_LOCAL_MACHINE\SOFTWARE]\n[HKEY_LOCAL_MACHINE\SOFTWARE\DreamWorks Interactive]\n[HKEY_LOCAL_MACHINE\SOFTWARE\DreamWorks Interactive\ChaosIsland]\n"Data Drive"=".\\"\n"PID"="71239-442-3367621-91206"\n"Installed Directory"=".\\"\n"Run File"=".\\"\n"InstallType"=dword:00000001\n"KBPS_OTHER"=dword:00000000\n"KBPS"=dword:00000000\n"Installed"=dword:00000001\n"NextTip"=dword:00000001\n"StartupTips"=dword:00000001\n"FPS"=dword:00000003\n\n
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=134217762
|
||||
flagg0=1744830464
|
||||
flagh0=1044
|
||||
flagi0=1212153860
|
||||
flagj0=4224
|
||||
flagk0=0
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
tflag0=0
|
||||
posx0=50
|
||||
posy0=50
|
||||
sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
swapeffect0=0
|
||||
maxddinterface0=7
|
@ -30,3 +30,6 @@ flagj0=128
|
||||
flagk0=65536
|
||||
swapeffect0=0
|
||||
registry0=
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
maxddinterface0=7
|
||||
|
@ -5,7 +5,7 @@ module0=
|
||||
opengllib0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=134218272
|
||||
flag0=134218274
|
||||
flagg0=1744830464
|
||||
flagh0=20
|
||||
flagi0=4194308
|
||||
@ -27,3 +27,9 @@ maxres0=-1
|
||||
launchpath0=
|
||||
notes0=
|
||||
flagj0=128
|
||||
registry0=
|
||||
flagk0=65536
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
swapeffect0=0
|
||||
maxddinterface0=7
|
||||
|
@ -12,7 +12,7 @@ flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=138543108
|
||||
flagj0=4224
|
||||
flagk0=0
|
||||
flagk0=268500992
|
||||
tflag0=0
|
||||
initx0=0
|
||||
inity0=0
|
||||
@ -29,3 +29,7 @@ initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
swapeffect0=0
|
||||
registry0=
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
maxddinterface0=7
|
||||
|
@ -6,8 +6,8 @@ module0=
|
||||
opengllib0=
|
||||
ver0=7
|
||||
coord0=0
|
||||
flag0=-2013265886
|
||||
flagg0=1209008128
|
||||
flag0=-2013249502
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=138412036
|
||||
flagj0=128
|
||||
@ -28,7 +28,7 @@ winver0=0
|
||||
maxres0=-1
|
||||
notes0=
|
||||
registry0=
|
||||
flagk0=0
|
||||
flagk0=327680
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
swapeffect0=0
|
||||
|
@ -5,8 +5,8 @@ module0=
|
||||
opengllib0=
|
||||
ver0=1
|
||||
coord0=0
|
||||
flag0=138428448
|
||||
flagg0=1242562576
|
||||
flag0=138428450
|
||||
flagg0=1241514000
|
||||
flagh0=20
|
||||
flagi0=4194304
|
||||
tflag0=0
|
||||
@ -26,4 +26,10 @@ launchpath0=
|
||||
winver0=0
|
||||
maxres0=0
|
||||
notes0=
|
||||
flagj0=8388737
|
||||
flagj0=129
|
||||
registry0=
|
||||
flagk0=262144
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
swapeffect0=0
|
||||
maxddinterface0=7
|
||||
|
@ -13,7 +13,7 @@ flagh0=20
|
||||
flagi0=138412036
|
||||
flagj0=4224
|
||||
flagk0=0
|
||||
tflag0=-2147477245
|
||||
tflag0=0
|
||||
initx0=0
|
||||
inity0=0
|
||||
minx0=0
|
||||
@ -29,3 +29,7 @@ initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
swapeffect0=0
|
||||
registry0=
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
maxddinterface0=7
|
||||
|
@ -6,7 +6,7 @@ opengllib0=
|
||||
ver0=1
|
||||
coord0=0
|
||||
flag0=134217762
|
||||
flagg0=1207959552
|
||||
flagg0=1744830464
|
||||
flagh0=20
|
||||
flagi0=4194308
|
||||
tflag0=0
|
||||
@ -25,7 +25,11 @@ initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
launchpath0=
|
||||
notes0=
|
||||
notes0=On Win10 it was necessary to activate Hook DLL flag and clean system shims.
|
||||
flagj0=128
|
||||
flagk0=0
|
||||
swapeffect0=0
|
||||
registry0=
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
maxddinterface0=7
|
||||
|
29
build/exports/Mechcommander Gold.dxw
Normal file
29
build/exports/Mechcommander Gold.dxw
Normal file
@ -0,0 +1,29 @@
|
||||
[target]
|
||||
title0=Mechcommander Gold
|
||||
path0=D:\Games\Mechcommander Gold RIP\Mechcommander\MCX.EXE
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
notes0=
|
||||
registry0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=681590818
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=138412038
|
||||
flagj0=4224
|
||||
flagk0=65536
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
tflag0=0
|
||||
posx0=50
|
||||
posy0=50
|
||||
sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
swapeffect0=0
|
||||
maxddinterface0=7
|
29
build/exports/Microsoft Golf '98 trial (win).dxw
Normal file
29
build/exports/Microsoft Golf '98 trial (win).dxw
Normal file
@ -0,0 +1,29 @@
|
||||
[target]
|
||||
title0=Microsoft Golf '98 trial (win)
|
||||
path0=D:\Games\MSGolf98\MSGOLF98\GAME.EXE
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
notes0=
|
||||
registry0=[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft]\n[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games]\n[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Golf '98]\n[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Golf '98\Version 1.0 Demo]\n"AppPath"="D:\\Games\\MSGolf98\\MSGOLF98"\n"InstallType"="1"\n"InstallPath"="D:\\Games\\MSGolf98\\MSGOLF98\\"\n"CDPath"="D:\\Games\\MSGolf98\\MSGOLF98"\n"Launched"="1"\n"PID"=""\n"Path"="D:\\Games\\MSGolf98\\MSGOLF98"\n"VersionType"="TrialVersion"\n"InstalledGroup"="1"\n"LangID"=dword:00000009\n
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=136314914
|
||||
flagg0=-671088640
|
||||
flagh0=1302
|
||||
flagi0=1212547076
|
||||
flagj0=4224
|
||||
flagk0=67436544
|
||||
flagl0=4
|
||||
flagm0=0
|
||||
tflag0=0
|
||||
posx0=50
|
||||
posy0=50
|
||||
sizx0=0
|
||||
sizy0=0
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
swapeffect0=0
|
||||
maxddinterface0=7
|
29
build/exports/No Respect (1.1).dxw
Normal file
29
build/exports/No Respect (1.1).dxw
Normal file
@ -0,0 +1,29 @@
|
||||
[target]
|
||||
title0=No Respect (1.1)
|
||||
path0=D:\Games\No Respect\nr11.exe
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
notes0=
|
||||
registry0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=681574434
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=138412036
|
||||
flagj0=4224
|
||||
flagk0=327680
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
tflag0=0
|
||||
posx0=50
|
||||
posy0=50
|
||||
sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
swapeffect0=0
|
||||
maxddinterface0=7
|
29
build/exports/No Respect.dxw
Normal file
29
build/exports/No Respect.dxw
Normal file
@ -0,0 +1,29 @@
|
||||
[target]
|
||||
title0=No Respect
|
||||
path0=D:\Games\No Respect\NR.EXE
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
notes0=
|
||||
registry0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=136314914
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=138412036
|
||||
flagj0=4224
|
||||
flagk0=327680
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
tflag0=0
|
||||
posx0=50
|
||||
posy0=50
|
||||
sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
swapeffect0=0
|
||||
maxddinterface0=7
|
29
build/exports/Phantasmagoria 2.dxw
Normal file
29
build/exports/Phantasmagoria 2.dxw
Normal file
@ -0,0 +1,29 @@
|
||||
[target]
|
||||
title0=Phantasmagoria 2
|
||||
path0=D:\Games\Phantasmagoria 2\SIERRAW.EXE
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
notes0=
|
||||
registry0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=681574434
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=138412036
|
||||
flagj0=4224
|
||||
flagk0=65536
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
tflag0=0
|
||||
posx0=50
|
||||
posy0=50
|
||||
sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
swapeffect0=0
|
||||
maxddinterface0=7
|
29
build/exports/Runaway.dxw
Normal file
29
build/exports/Runaway.dxw
Normal file
@ -0,0 +1,29 @@
|
||||
[target]
|
||||
title0=Runaway
|
||||
path0=D:\Games\MVM 2004 - Runaway\Runaway.exe
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
notes0=
|
||||
registry0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=136314912
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=138412038
|
||||
flagj0=266368
|
||||
flagk0=65536
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
tflag0=0
|
||||
posx0=50
|
||||
posy0=50
|
||||
sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
swapeffect0=0
|
||||
maxddinterface0=7
|
@ -5,10 +5,10 @@ module0=
|
||||
opengllib0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=679494176
|
||||
flagg0=134217728
|
||||
flag0=679494178
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=4
|
||||
flagi0=4194308
|
||||
tflag0=0
|
||||
initx0=0
|
||||
inity0=0
|
||||
@ -24,3 +24,12 @@ maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
launchpath0=
|
||||
notes0=
|
||||
registry0=
|
||||
flagj0=128
|
||||
flagk0=65536
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
swapeffect0=0
|
||||
maxddinterface0=7
|
||||
|
@ -1060,3 +1060,11 @@ fix: reorganized menu commands
|
||||
fix: proper handling of DEFAULT win size on CreateWindowEx - fixes "Imperialism" problem
|
||||
fix: fixed stretced blit operation because Blt behaves differently from StretchBlt. Fixes "3D Minigolf" partial background
|
||||
fix: GetPixel logging
|
||||
|
||||
v2.03.59
|
||||
fix: added extra ref to surface for ddraw version 2: fixes "Warhammer Chaos Gate"
|
||||
add: view shims menu command, to analyze Win7/Win10 compatibility patches
|
||||
GUI: added the hook tab to move hooking flags in a single tab page
|
||||
|
||||
v2.03.60
|
||||
too many things, sorry, I'll fix it later.
|
1
build/redist/.gitattributes
vendored
1
build/redist/.gitattributes
vendored
@ -1 +0,0 @@
|
||||
*.{dll,exe} filter=lfs diff=lfs merge=lfs -text
|
Binary file not shown.
Binary file not shown.
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:011e92e868f1f09904bef59b46972c318c2867c279380182e23bc1fd7eaf1d11
|
||||
size 31744
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:fd80f3839a035b6b52362735b22eb8d2523d3434bf18afb3e0f1b5ace84357b0
|
||||
size 437008
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8194ca60e6eda8f5c3fe67990bb38f7d3e68e9beba9d6adf5c68fab9478b94f5
|
||||
size 57344
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7fe37bba5475b66375d286ee92bc10cfcdeff6e9fa1ef112eb2813b86d4d4065
|
||||
size 42768
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3aaa614fdf6986017cbe6ade045d404f08872e6a90d6a0d54c30e438a2bdee65
|
||||
size 677888
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b34beff662415ef318ea0bba7f0f01faf8a5593e3903e4645e290077cd74d6e3
|
||||
size 2765965
|
@ -13,23 +13,31 @@
|
||||
extern LPDIRECTDRAWSURFACE lpDDSEmu_Prim;
|
||||
extern LPDIRECTDRAW lpPrimaryDD;
|
||||
extern Blt_Type pBlt;
|
||||
extern ReleaseS_Type pReleaseS;
|
||||
extern ReleaseS_Type pReleaseSMethod();
|
||||
extern CreateSurface1_Type pCreateSurface1;
|
||||
extern CreateSurface1_Type pCreateSurface2;
|
||||
extern CreateSurface1_Type pCreateSurface3;
|
||||
extern CreateSurface2_Type pCreateSurface4;
|
||||
extern CreateSurface2_Type pCreateSurface7;
|
||||
extern Unlock4_Type pUnlockMethod(LPDIRECTDRAWSURFACE);
|
||||
extern Unlock4_Type pUnlockMethod();
|
||||
extern HDC hFlippedDC;
|
||||
extern BOOL bFlippedDC;
|
||||
extern ReleaseDC_Type pReleaseDC;
|
||||
extern ReleaseDC_Type pReleaseDC1;
|
||||
extern ReleaseDC_Type pReleaseDC2;
|
||||
extern ReleaseDC_Type pReleaseDC3;
|
||||
extern ReleaseDC_Type pReleaseDC4;
|
||||
extern ReleaseDC_Type pReleaseDC7;
|
||||
|
||||
extern void BlitError(HRESULT, LPRECT, LPRECT, int);
|
||||
extern void BlitTrace(char *, LPRECT, LPRECT, int);
|
||||
extern void DescribeSurface(LPDIRECTDRAWSURFACE, int, char *, int);
|
||||
extern void TextureHandling(LPDIRECTDRAWSURFACE);
|
||||
extern GetSurfaceDesc2_Type pGetSurfaceDescMethod();
|
||||
extern int GetSurfaceDescSize();
|
||||
extern GetSurfaceDesc2_Type GetSurfaceDescMethod();
|
||||
extern Blt_Type pBltMethod();
|
||||
|
||||
static HRESULT sBltNoPrimary(char *api, LPDIRECTDRAWSURFACE lpdds, LPRECT lpdestrect,
|
||||
static HRESULT sBltNoPrimary(int dxversion, Blt_Type pBlt, char *api, LPDIRECTDRAWSURFACE lpdds, LPRECT lpdestrect,
|
||||
LPDIRECTDRAWSURFACE lpddssrc, LPRECT lpsrcrect, DWORD dwflags, LPDDBLTFX lpddbltfx)
|
||||
{
|
||||
RECT srcrect;
|
||||
@ -89,8 +97,8 @@ static HRESULT sBltNoPrimary(char *api, LPDIRECTDRAWSURFACE lpdds, LPRECT lpdest
|
||||
// }
|
||||
// break;
|
||||
case DDERR_SURFACEBUSY:
|
||||
(*pUnlockMethod(lpdds))(lpdds, NULL);
|
||||
if (lpddssrc) (*pUnlockMethod(lpddssrc))(lpddssrc, NULL);
|
||||
(*pUnlockMethod())(lpdds, NULL);
|
||||
if (lpddssrc) (*pUnlockMethod())(lpddssrc, NULL);
|
||||
if (IsDebug) BlitTrace("BUSY", lpsrcrect ? &srcrect : NULL, lpdestrect, __LINE__);
|
||||
res=(*pBlt)(lpdds, lpdestrect, lpddssrc, lpsrcrect ? &srcrect : NULL, dwflags|DDBLT_WAIT, lpddbltfx);
|
||||
break;
|
||||
@ -110,7 +118,7 @@ static HRESULT sBltNoPrimary(char *api, LPDIRECTDRAWSURFACE lpdds, LPRECT lpdest
|
||||
return res;
|
||||
}
|
||||
|
||||
static HRESULT sBltToPrimary(char *api, LPDIRECTDRAWSURFACE lpdds, LPRECT lpdestrect,
|
||||
static HRESULT sBltToPrimary(int dxversion, Blt_Type pBlt, char *api, LPDIRECTDRAWSURFACE lpdds, LPRECT lpdestrect,
|
||||
LPDIRECTDRAWSURFACE lpddssrc, LPRECT lpsrcrect, DWORD dwflags, LPDDBLTFX lpddbltfx, BOOL isFlipping)
|
||||
{
|
||||
HRESULT res;
|
||||
@ -184,7 +192,7 @@ static HRESULT sBltToPrimary(char *api, LPDIRECTDRAWSURFACE lpdds, LPRECT lpdest
|
||||
if (lpdds != lpddssrc) {
|
||||
dxw.ShowOverlay(lpddssrc);
|
||||
if (IsDebug) BlitTrace("PRIM-NOEMU", lpsrcrect, &destrect, __LINE__);
|
||||
res=(*pPrimaryBlt)(lpdds, &destrect, lpddssrc, lpsrcrect);
|
||||
res=(*pPrimaryBlt)(dxversion, pBlt, lpdds, &destrect, lpddssrc, lpsrcrect);
|
||||
}
|
||||
if(res){
|
||||
BlitError(res, lpsrcrect, &destrect, __LINE__);
|
||||
@ -194,8 +202,8 @@ static HRESULT sBltToPrimary(char *api, LPDIRECTDRAWSURFACE lpdds, LPRECT lpdest
|
||||
}
|
||||
// Try to handle HDC lock concurrency....
|
||||
if(res==DDERR_SURFACEBUSY){
|
||||
(*pUnlockMethod(lpdds))(lpdds, NULL);
|
||||
if(lpddssrc) (*pUnlockMethod(lpdds))(lpdds, NULL);
|
||||
(*pUnlockMethod())(lpdds, NULL);
|
||||
if(lpddssrc) (*pUnlockMethod())(lpdds, NULL);
|
||||
if (IsDebug) BlitTrace("BUSY", lpsrcrect, &destrect, __LINE__);
|
||||
res= (*pBlt)(lpdds, &destrect, lpddssrc, lpsrcrect, dwflags, lpddbltfx);
|
||||
if (res) BlitError(res, lpsrcrect, &destrect, __LINE__);
|
||||
@ -203,26 +211,26 @@ static HRESULT sBltToPrimary(char *api, LPDIRECTDRAWSURFACE lpdds, LPRECT lpdest
|
||||
// Try to handle DDBLT_KEYSRC on primary surface
|
||||
if((res==DDERR_INVALIDPARAMS) && (dwflags & DDBLT_KEYSRC)){
|
||||
// to do: handle possible situations with surface 2 / 4 / 7 types
|
||||
DDSURFACEDESC ddsd;
|
||||
LPDIRECTDRAWSURFACE lpddsTmp;
|
||||
extern GetSurfaceDesc_Type pGetSurfaceDesc1;
|
||||
DDSURFACEDESC2 ddsd;
|
||||
LPDIRECTDRAWSURFACE2 lpddsTmp;
|
||||
extern CreateSurface2_Type pCreateSurfaceMethod();
|
||||
if (IsDebug) BlitTrace("KEYSRC", lpsrcrect, &destrect, __LINE__);
|
||||
memset(&ddsd, 0, sizeof(ddsd));
|
||||
ddsd.dwSize = sizeof(ddsd);
|
||||
(*pGetSurfaceDesc1)(lpddssrc, &ddsd);
|
||||
res=(*pCreateSurface1)(lpPrimaryDD, &ddsd, &lpddsTmp, NULL);
|
||||
ddsd.dwSize = GetSurfaceDescSize();
|
||||
(*pGetSurfaceDescMethod())((LPDIRECTDRAWSURFACE2)lpddssrc, &ddsd);
|
||||
res=(*pCreateSurfaceMethod())(lpPrimaryDD, &ddsd, (LPDIRECTDRAWSURFACE *)&lpddsTmp, NULL);
|
||||
if(res) OutTraceE("CreateSurface: ERROR %x(%s) at %d", res, ExplainDDError(res), __LINE__);
|
||||
// copy background
|
||||
res= (*pBlt)(lpddsTmp, lpsrcrect, lpdds, &destrect, DDBLT_WAIT, NULL);
|
||||
res= (*pBlt)((LPDIRECTDRAWSURFACE)lpddsTmp, lpsrcrect, lpdds, &destrect, DDBLT_WAIT, NULL);
|
||||
if(res) OutTraceE("Blt: ERROR %x(%s) at %d", res, ExplainDDError(res), __LINE__);
|
||||
// overlay texture
|
||||
res= (*pBlt)(lpddsTmp, lpsrcrect, lpddssrc, lpsrcrect, dwflags, lpddbltfx);
|
||||
res= (*pBlt)((LPDIRECTDRAWSURFACE)lpddsTmp, lpsrcrect, lpddssrc, lpsrcrect, dwflags, lpddbltfx);
|
||||
if(res) OutTraceE("Blt: ERROR %x(%s) at %d", res, ExplainDDError(res), __LINE__);
|
||||
// copy back to destination
|
||||
res= (*pBlt)(lpdds, &destrect, lpddsTmp, lpsrcrect, DDBLT_WAIT, lpddbltfx);
|
||||
res= (*pBlt)(lpdds, &destrect, (LPDIRECTDRAWSURFACE)lpddsTmp, lpsrcrect, DDBLT_WAIT, lpddbltfx);
|
||||
if(res) OutTraceE("Blt: ERROR %x(%s) at %d", res, ExplainDDError(res), __LINE__);
|
||||
if (res) BlitError(res, lpsrcrect, &destrect, __LINE__);
|
||||
(*pReleaseS)(lpddsTmp);
|
||||
(*pReleaseSMethod())((LPDIRECTDRAWSURFACE)lpddsTmp);
|
||||
}
|
||||
if(dxw.dwFlags1 & SUPPRESSDXERRORS) res=DD_OK;
|
||||
}
|
||||
@ -287,14 +295,24 @@ static HRESULT sBltToPrimary(char *api, LPDIRECTDRAWSURFACE lpdds, LPRECT lpdest
|
||||
|
||||
// Try to handle HDC lock concurrency....
|
||||
if(res==DDERR_SURFACEBUSY){
|
||||
if (bFlippedDC) (*pReleaseDC)(lpdds, hFlippedDC);
|
||||
if (bFlippedDC) {
|
||||
ReleaseDC_Type pReleaseDC;
|
||||
switch(dxversion){
|
||||
case 1: pReleaseDC=pReleaseDC1; break;
|
||||
case 2: pReleaseDC=pReleaseDC2; break;
|
||||
case 3: pReleaseDC=pReleaseDC3; break;
|
||||
case 4: pReleaseDC=pReleaseDC4; break;
|
||||
case 7: pReleaseDC=pReleaseDC7; break;
|
||||
}
|
||||
(*pReleaseDC)(lpdds, hFlippedDC);
|
||||
}
|
||||
|
||||
// v2.03.49: resumed because if fixes locked surfaces on "Red Alert 1" on WinXP as reported by cloudstr
|
||||
if(lpddssrc) { // lpddssrc could be NULL!!!
|
||||
res=(*pUnlockMethod(lpddssrc))(lpddssrc, NULL);
|
||||
res=(*pUnlockMethod())(lpddssrc, NULL);
|
||||
if(res && (res!=DDERR_NOTLOCKED)) OutTraceE("Unlock ERROR: lpdds=%x err=%x(%s)\n", lpddssrc, res, ExplainDDError(res));
|
||||
}
|
||||
res=(*pUnlockMethod(lpdds))(lpdds, NULL); // v2.03.24 reintroduced because of "Virtua Cop"
|
||||
res=(*pUnlockMethod())(lpdds, NULL); // v2.03.24 reintroduced because of "Virtua Cop"
|
||||
if(res && (res!=DDERR_NOTLOCKED)) OutTraceE("Unlock ERROR: lpdds=%x err=%x(%s)\n", lpdds, res, ExplainDDError(res));
|
||||
|
||||
if (IsDebug) BlitTrace("BUSY", &emurect, &destrect, __LINE__);
|
||||
@ -307,7 +325,7 @@ static HRESULT sBltToPrimary(char *api, LPDIRECTDRAWSURFACE lpdds, LPRECT lpdest
|
||||
}
|
||||
|
||||
LPDIRECTDRAWSURFACE lpDDSSource;
|
||||
if (res=(*pColorConversion)(lpdds, emurect, &lpDDSSource)) {
|
||||
if (res=(*pColorConversion)(dxversion, lpdds, emurect, &lpDDSSource)) {
|
||||
OutTraceE("sBlt ERROR: Color conversion failed res=%x(%s)\n", res, ExplainDDError(res));
|
||||
if(dxw.dwFlags1 & SUPPRESSDXERRORS) res=DD_OK;
|
||||
return res;
|
||||
@ -321,7 +339,7 @@ static HRESULT sBltToPrimary(char *api, LPDIRECTDRAWSURFACE lpdds, LPRECT lpdest
|
||||
emurect.bottom <<= 1;
|
||||
}
|
||||
if (IsDebug) BlitTrace("BACK2PRIM", &emurect, &destrect, __LINE__);
|
||||
res=(*pPrimaryBlt)(lpDDSEmu_Prim, &destrect, lpDDSSource, &emurect);
|
||||
res=(*pPrimaryBlt)(dxversion, pBlt, lpDDSEmu_Prim, &destrect, lpDDSSource, &emurect);
|
||||
|
||||
if (res) BlitError(res, &emurect, &destrect, __LINE__);
|
||||
if(dxw.dwFlags1 & SUPPRESSDXERRORS) res=DD_OK;
|
||||
@ -329,7 +347,7 @@ static HRESULT sBltToPrimary(char *api, LPDIRECTDRAWSURFACE lpdds, LPRECT lpdest
|
||||
return res;
|
||||
}
|
||||
|
||||
HRESULT WINAPI sBlt(char *api, LPDIRECTDRAWSURFACE lpdds, LPRECT lpdestrect,
|
||||
HRESULT WINAPI sBlt(int dxversion, Blt_Type pBlt, char *api, LPDIRECTDRAWSURFACE lpdds, LPRECT lpdestrect,
|
||||
LPDIRECTDRAWSURFACE lpddssrc, LPRECT lpsrcrect, DWORD dwflags, LPDDBLTFX lpddbltfx, BOOL isFlipping)
|
||||
{
|
||||
POINT p = {0, 0};
|
||||
@ -396,9 +414,9 @@ HRESULT WINAPI sBlt(char *api, LPDIRECTDRAWSURFACE lpdds, LPRECT lpdestrect,
|
||||
}
|
||||
|
||||
if(ToPrim)
|
||||
res = sBltToPrimary(api, lpdds, lpdestrect, lpddssrc, lpsrcrect, dwflags, lpddbltfx, isFlipping);
|
||||
res = sBltToPrimary(dxversion, pBlt, api, lpdds, lpdestrect, lpddssrc, lpsrcrect, dwflags, lpddbltfx, isFlipping);
|
||||
else
|
||||
res = sBltNoPrimary(api, lpdds, lpdestrect, lpddssrc, lpsrcrect, dwflags, lpddbltfx);
|
||||
res = sBltNoPrimary(dxversion, pBlt, api, lpdds, lpdestrect, lpddssrc, lpsrcrect, dwflags, lpddbltfx);
|
||||
|
||||
return res;
|
||||
}
|
2028
dll/ddraw.cpp
2028
dll/ddraw.cpp
File diff suppressed because it is too large
Load Diff
@ -12,9 +12,9 @@ typedef HRESULT (WINAPI *Lock_Type)(LPDIRECTDRAWSURFACE, LPRECT, LPDDSURFACEDESC
|
||||
typedef HRESULT (WINAPI *Unlock4_Type)(LPDIRECTDRAWSURFACE, LPRECT);
|
||||
typedef HRESULT (WINAPI *Unlock1_Type)(LPDIRECTDRAWSURFACE, LPVOID);
|
||||
|
||||
extern Lock_Type pLock;
|
||||
extern Unlock4_Type pUnlockMethod(LPDIRECTDRAWSURFACE);
|
||||
extern int Set_dwSize_From_Surface(LPDIRECTDRAWSURFACE);
|
||||
extern Lock_Type pLockMethod();
|
||||
extern Unlock4_Type pUnlockMethod();
|
||||
extern int Set_dwSize_From_Surface();
|
||||
|
||||
void DDrawScreenShot()
|
||||
{
|
||||
@ -47,9 +47,9 @@ void DDrawScreenShot()
|
||||
if(!s) return;
|
||||
|
||||
memset(&ddsd,0,sizeof(DDSURFACEDESC2));
|
||||
ddsd.dwSize = Set_dwSize_From_Surface(s);
|
||||
ddsd.dwSize = Set_dwSize_From_Surface();
|
||||
ddsd.dwFlags = DDSD_LPSURFACE | DDSD_PITCH;
|
||||
if(res=(*pLock)(s, 0, (LPDDSURFACEDESC)&ddsd, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
if(res=(*pLockMethod())(s, 0, (LPDDSURFACEDESC)&ddsd, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
OutTraceE("ScreenShot: Lock ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return;
|
||||
}
|
||||
@ -126,6 +126,6 @@ void DDrawScreenShot()
|
||||
fclose(hf);
|
||||
break;
|
||||
}
|
||||
res=(*pUnlockMethod(s))(s, NULL);
|
||||
res=(*pUnlockMethod())(s, NULL);
|
||||
if (res) OutTraceE("ScreenShot: Unlock ERROR lpdds=%x res=%x(%s) at %d\n", s, res, ExplainDDError(res), __LINE__);
|
||||
}
|
||||
|
@ -15,9 +15,9 @@ typedef HRESULT (WINAPI *Lock_Type)(LPDIRECTDRAWSURFACE, LPRECT, LPDDSURFACEDESC
|
||||
typedef HRESULT (WINAPI *Unlock4_Type)(LPDIRECTDRAWSURFACE, LPRECT);
|
||||
typedef HRESULT (WINAPI *Unlock1_Type)(LPDIRECTDRAWSURFACE, LPVOID);
|
||||
|
||||
extern Lock_Type pLock;
|
||||
extern Unlock4_Type pUnlockMethod(LPDIRECTDRAWSURFACE);
|
||||
extern int Set_dwSize_From_Surface(LPDIRECTDRAWSURFACE);
|
||||
extern Lock_Type pLockMethod();
|
||||
extern Unlock4_Type pUnlockMethod();
|
||||
extern int Set_dwSize_From_Surface();
|
||||
|
||||
#define GRIDSIZE 16
|
||||
|
||||
@ -109,9 +109,9 @@ void TextureHighlight(LPDIRECTDRAWSURFACE s)
|
||||
int x, y, w, h;
|
||||
HRESULT res;
|
||||
memset(&ddsd,0,sizeof(DDSURFACEDESC2));
|
||||
ddsd.dwSize = Set_dwSize_From_Surface(s);
|
||||
ddsd.dwSize = Set_dwSize_From_Surface();
|
||||
ddsd.dwFlags = DDSD_LPSURFACE | DDSD_PITCH;
|
||||
if(res=(*pLock)(s, 0, (LPDDSURFACEDESC)&ddsd, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
if(res=(*pLockMethod())(s, 0, (LPDDSURFACEDESC)&ddsd, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
OutTraceE("TextureHigh: Lock ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return;
|
||||
}
|
||||
@ -171,7 +171,7 @@ void TextureHighlight(LPDIRECTDRAWSURFACE s)
|
||||
break;
|
||||
}
|
||||
}
|
||||
res=(*pUnlockMethod(s))(s, NULL);
|
||||
res=(*pUnlockMethod())(s, NULL);
|
||||
if (res) OutTraceE("TextureHigh: Unlock ERROR lpdds=%x res=%x(%s) at %d\n", s, res, ExplainDDError(res), __LINE__);
|
||||
}
|
||||
|
||||
@ -198,9 +198,9 @@ static void TextureDump(LPDIRECTDRAWSURFACE s)
|
||||
}
|
||||
|
||||
memset(&ddsd,0,sizeof(DDSURFACEDESC2));
|
||||
ddsd.dwSize = Set_dwSize_From_Surface(s);
|
||||
ddsd.dwSize = Set_dwSize_From_Surface();
|
||||
ddsd.dwFlags = DDSD_LPSURFACE | DDSD_PITCH;
|
||||
if(res=(*pLock)(s, 0, (LPDDSURFACEDESC)&ddsd, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
if(res=(*pLockMethod())(s, 0, (LPDDSURFACEDESC)&ddsd, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
OutTraceE("TextureDump: Lock ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return;
|
||||
}
|
||||
@ -294,7 +294,7 @@ static void TextureDump(LPDIRECTDRAWSURFACE s)
|
||||
fclose(hf);
|
||||
break;
|
||||
}
|
||||
res=(*pUnlockMethod(s))(s, NULL);
|
||||
res=(*pUnlockMethod())(s, NULL);
|
||||
if (res) OutTraceE("TextureDump: Unlock ERROR lpdds=%x res=%x(%s) at %d\n", s, res, ExplainDDError(res), __LINE__);
|
||||
}
|
||||
|
||||
@ -305,9 +305,9 @@ static void TextureHack(LPDIRECTDRAWSURFACE s)
|
||||
HRESULT res;
|
||||
|
||||
memset(&ddsd,0,sizeof(DDSURFACEDESC2));
|
||||
ddsd.dwSize = Set_dwSize_From_Surface(s);
|
||||
ddsd.dwSize = Set_dwSize_From_Surface();
|
||||
ddsd.dwFlags = DDSD_LPSURFACE | DDSD_PITCH;
|
||||
if(res=(*pLock)(s, 0, (LPDDSURFACEDESC)&ddsd, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
if(res=(*pLockMethod())(s, 0, (LPDDSURFACEDESC)&ddsd, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
OutTraceE("TextureHack: Lock ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return;
|
||||
}
|
||||
@ -382,7 +382,7 @@ static void TextureHack(LPDIRECTDRAWSURFACE s)
|
||||
fclose(hf);
|
||||
break;
|
||||
}
|
||||
res=(*pUnlockMethod(s))(s, NULL);
|
||||
res=(*pUnlockMethod())(s, NULL);
|
||||
if (res) OutTraceE("TextureHack: Unlock ERROR lpdds=%x res=%x(%s) at %d\n", s, res, ExplainDDError(res), __LINE__);
|
||||
}
|
||||
|
||||
|
294
dll/dxemublt.cpp
294
dll/dxemublt.cpp
@ -11,8 +11,8 @@ typedef HRESULT (WINAPI *Lock_Type)(LPDIRECTDRAWSURFACE, LPRECT, LPDDSURFACEDESC
|
||||
typedef HRESULT (WINAPI *Unlock4_Type)(LPDIRECTDRAWSURFACE, LPRECT);
|
||||
typedef HRESULT (WINAPI *Unlock1_Type)(LPDIRECTDRAWSURFACE, LPVOID);
|
||||
|
||||
extern Lock_Type pLock;
|
||||
extern Unlock4_Type pUnlockMethod(LPDIRECTDRAWSURFACE);
|
||||
extern Lock_Type pLockMethod();
|
||||
extern Unlock4_Type pUnlockMethod();
|
||||
|
||||
extern DWORD PaletteEntries[256];
|
||||
extern DWORD *Palette16BPP;
|
||||
@ -134,7 +134,7 @@ static void SetPalette16BPP()
|
||||
}
|
||||
}
|
||||
|
||||
static HRESULT WINAPI EmuBlt_8_to_32(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdestrect,
|
||||
static HRESULT WINAPI EmuBlt_8_to_32(int dxversion, Blt_Type pBlt, LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdestrect,
|
||||
LPDIRECTDRAWSURFACE lpddssrc, LPRECT lpsrcrect, DWORD dwflags, LPVOID lpsurface)
|
||||
{
|
||||
HRESULT res;
|
||||
@ -148,27 +148,27 @@ static HRESULT WINAPI EmuBlt_8_to_32(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdest
|
||||
h = lpdestrect->bottom - lpdestrect->top;
|
||||
|
||||
memset(&ddsd_dst,0,sizeof(DDSURFACEDESC2));
|
||||
ddsd_dst.dwSize = Set_dwSize_From_Surface(lpddsdst);
|
||||
ddsd_dst.dwSize = Set_dwSize_From_Surface();
|
||||
ddsd_dst.dwFlags = DDSD_LPSURFACE | DDSD_PITCH;
|
||||
if(res=(*pLock)(lpddsdst, 0, (LPDDSURFACEDESC)&ddsd_dst, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
if(res=(*pLockMethod())(lpddsdst, 0, (LPDDSURFACEDESC)&ddsd_dst, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
OutTraceE("EmuBlt8_32: Lock ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
|
||||
memset(&ddsd_src,0,sizeof(DDSURFACEDESC2));
|
||||
ddsd_src.dwSize = Set_dwSize_From_Surface(lpddssrc);
|
||||
ddsd_src.dwSize = Set_dwSize_From_Surface();
|
||||
ddsd_src.dwFlags = DDSD_LPSURFACE | DDSD_PITCH;
|
||||
if (lpsurface) { // already locked, just get info ....
|
||||
if(res=lpddssrc->GetSurfaceDesc((LPDDSURFACEDESC)&ddsd_src)) {
|
||||
OutTraceE("EmuBlt8_32: GetSurfaceDesc ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
(*pUnlockMethod(lpddsdst))(lpddsdst, lpdestrect);
|
||||
(*pUnlockMethod(lpddssrc))(lpddssrc, lpsrcrect);
|
||||
(*pUnlockMethod())(lpddsdst, lpdestrect);
|
||||
(*pUnlockMethod())(lpddssrc, lpsrcrect);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(res=(*pLock)(lpddssrc, 0, (LPDDSURFACEDESC)&ddsd_src, DDLOCK_SURFACEMEMORYPTR|DDLOCK_READONLY, 0)) {
|
||||
(*pUnlockMethod(lpddsdst))(lpddsdst,0);
|
||||
if(res=(*pLockMethod())(lpddssrc, 0, (LPDDSURFACEDESC)&ddsd_src, DDLOCK_SURFACEMEMORYPTR|DDLOCK_READONLY, 0)) {
|
||||
(*pUnlockMethod())(lpddsdst,0);
|
||||
OutTraceE("EmuBlt8_32: Lock ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return 0;
|
||||
}
|
||||
@ -198,14 +198,14 @@ static HRESULT WINAPI EmuBlt_8_to_32(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdest
|
||||
|
||||
if(dxw.dwFlags3 & MARKBLIT) MarkRect32(dest0, w, h, destpitch);
|
||||
|
||||
res=(*pUnlockMethod(lpddsdst))(lpddsdst, lpdestrect);
|
||||
res=(*pUnlockMethod())(lpddsdst, lpdestrect);
|
||||
if (res) OutTraceE("EmuBlt8_32: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddsdst, res, ExplainDDError(res), __LINE__);
|
||||
res=(*pUnlockMethod(lpddssrc))(lpddssrc, lpsrcrect);
|
||||
res=(*pUnlockMethod())(lpddssrc, lpsrcrect);
|
||||
if (res) OutTraceE("EmuBlt8_32: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddssrc, res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BilinearBlt_8_to_32(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdestrect,
|
||||
static HRESULT WINAPI BilinearBlt_8_to_32(int dxversion, Blt_Type pBlt, LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdestrect,
|
||||
LPDIRECTDRAWSURFACE lpddssrc, LPRECT lpsrcrect, DWORD dwflags, LPVOID lpsurface)
|
||||
{
|
||||
HRESULT res;
|
||||
@ -224,27 +224,27 @@ static HRESULT WINAPI BilinearBlt_8_to_32(LPDIRECTDRAWSURFACE lpddsdst, LPRECT l
|
||||
lpdestrect->bottom <<= 1;
|
||||
|
||||
memset(&ddsd_dst,0,sizeof(DDSURFACEDESC2));
|
||||
ddsd_dst.dwSize = Set_dwSize_From_Surface(lpddsdst);
|
||||
ddsd_dst.dwSize = Set_dwSize_From_Surface();
|
||||
ddsd_dst.dwFlags = DDSD_LPSURFACE | DDSD_PITCH;
|
||||
if(res=(*pLock)(lpddsdst, 0, (LPDDSURFACEDESC)&ddsd_dst, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
if(res=(*pLockMethod())(lpddsdst, 0, (LPDDSURFACEDESC)&ddsd_dst, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
OutTraceE("BilBlt8_32: Lock ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
|
||||
memset(&ddsd_src,0,sizeof(DDSURFACEDESC2));
|
||||
ddsd_src.dwSize = Set_dwSize_From_Surface(lpddssrc);
|
||||
ddsd_src.dwSize = Set_dwSize_From_Surface();
|
||||
ddsd_src.dwFlags = DDSD_LPSURFACE | DDSD_PITCH;
|
||||
if (lpsurface) { // already locked, just get info ....
|
||||
if(res=lpddssrc->GetSurfaceDesc((LPDDSURFACEDESC)&ddsd_src)) {
|
||||
OutTraceE("BilBlt8_32: GetSurfaceDesc ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
(*pUnlockMethod(lpddsdst))(lpddsdst, lpdestrect);
|
||||
(*pUnlockMethod(lpddssrc))(lpddssrc, lpsrcrect);
|
||||
(*pUnlockMethod())(lpddsdst, lpdestrect);
|
||||
(*pUnlockMethod())(lpddssrc, lpsrcrect);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(res=(*pLock)(lpddssrc, 0, (LPDDSURFACEDESC)&ddsd_src, DDLOCK_SURFACEMEMORYPTR|DDLOCK_READONLY, 0)) {
|
||||
(*pUnlockMethod(lpddsdst))(lpddsdst,0);
|
||||
if(res=(*pLockMethod())(lpddssrc, 0, (LPDDSURFACEDESC)&ddsd_src, DDLOCK_SURFACEMEMORYPTR|DDLOCK_READONLY, 0)) {
|
||||
(*pUnlockMethod())(lpddsdst,0);
|
||||
OutTraceE("BilBlt8_32: Lock ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return 0;
|
||||
}
|
||||
@ -297,14 +297,14 @@ static HRESULT WINAPI BilinearBlt_8_to_32(LPDIRECTDRAWSURFACE lpddsdst, LPRECT l
|
||||
|
||||
if(dxw.dwFlags3 & MARKBLIT) MarkRect32(dest0, 2*w, 2*h, destpitch);
|
||||
|
||||
res=(*pUnlockMethod(lpddsdst))(lpddsdst, lpdestrect);
|
||||
res=(*pUnlockMethod())(lpddsdst, lpdestrect);
|
||||
if (res) OutTraceE("BilBlt8_32: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddsdst, res, ExplainDDError(res), __LINE__);
|
||||
res=(*pUnlockMethod(lpddssrc))(lpddssrc, lpsrcrect);
|
||||
res=(*pUnlockMethod())(lpddssrc, lpsrcrect);
|
||||
if (res) OutTraceE("BilBlt8_32: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddssrc, res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI EmuBlt_16_to_32(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdestrect,
|
||||
static HRESULT WINAPI EmuBlt_16_to_32(int dxversion, Blt_Type pBlt, LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdestrect,
|
||||
LPDIRECTDRAWSURFACE lpddssrc, LPRECT lpsrcrect, DWORD dwflags, LPVOID lpsurface)
|
||||
{
|
||||
HRESULT res;
|
||||
@ -318,27 +318,27 @@ static HRESULT WINAPI EmuBlt_16_to_32(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdes
|
||||
h = lpdestrect->bottom - lpdestrect->top;
|
||||
|
||||
memset(&ddsd_dst,0,sizeof(DDSURFACEDESC2));
|
||||
ddsd_dst.dwSize = Set_dwSize_From_Surface(lpddsdst);
|
||||
ddsd_dst.dwSize = Set_dwSize_From_Surface();
|
||||
ddsd_dst.dwFlags = DDSD_LPSURFACE | DDSD_PITCH;
|
||||
if(res=(*pLock)(lpddsdst, 0, (LPDDSURFACEDESC)&ddsd_dst, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
if(res=(*pLockMethod())(lpddsdst, 0, (LPDDSURFACEDESC)&ddsd_dst, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
OutTraceE("EmuBlt16_32: Lock ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
|
||||
memset(&ddsd_src,0,sizeof(DDSURFACEDESC2));
|
||||
ddsd_src.dwSize = Set_dwSize_From_Surface(lpddssrc);
|
||||
ddsd_src.dwSize = Set_dwSize_From_Surface();
|
||||
ddsd_src.dwFlags = DDSD_LPSURFACE | DDSD_PITCH;
|
||||
if (lpsurface) { // already locked, just get info ....
|
||||
if(res=lpddssrc->GetSurfaceDesc((LPDDSURFACEDESC)&ddsd_src)) {
|
||||
OutTraceE("EmuBlt16_32: GetSurfaceDesc ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
(*pUnlockMethod(lpddsdst))(lpddsdst, lpdestrect);
|
||||
(*pUnlockMethod(lpddssrc))(lpddssrc, lpsrcrect);
|
||||
(*pUnlockMethod())(lpddsdst, lpdestrect);
|
||||
(*pUnlockMethod())(lpddssrc, lpsrcrect);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(res=(*pLock)(lpddssrc, 0, (LPDDSURFACEDESC)&ddsd_src, DDLOCK_SURFACEMEMORYPTR|DDLOCK_READONLY|DDLOCK_WAIT, 0)) {
|
||||
(*pUnlockMethod(lpddsdst))(lpddsdst,0);
|
||||
if(res=(*pLockMethod())(lpddssrc, 0, (LPDDSURFACEDESC)&ddsd_src, DDLOCK_SURFACEMEMORYPTR|DDLOCK_READONLY|DDLOCK_WAIT, 0)) {
|
||||
(*pUnlockMethod())(lpddsdst,0);
|
||||
OutTraceE("EmuBlt16_32: Lock ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
@ -371,14 +371,14 @@ static HRESULT WINAPI EmuBlt_16_to_32(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdes
|
||||
|
||||
if(dxw.dwFlags3 & MARKBLIT) MarkRect32(dest0, w, h, destpitch);
|
||||
|
||||
res=(*pUnlockMethod(lpddsdst))(lpddsdst, lpdestrect);
|
||||
res=(*pUnlockMethod())(lpddsdst, lpdestrect);
|
||||
if (res) OutTraceE("EmuBlt16_32: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddsdst, res, ExplainDDError(res), __LINE__);
|
||||
res=(*pUnlockMethod(lpddssrc))(lpddssrc, lpsrcrect);
|
||||
res=(*pUnlockMethod())(lpddssrc, lpsrcrect);
|
||||
if (res) OutTraceE("EmuBlt16_32: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddssrc, res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI Deinterlace_16_to_32(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdestrect,
|
||||
static HRESULT WINAPI Deinterlace_16_to_32(int dxversion, Blt_Type pBlt, LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdestrect,
|
||||
LPDIRECTDRAWSURFACE lpddssrc, LPRECT lpsrcrect, DWORD dwflags, LPVOID lpsurface)
|
||||
{
|
||||
HRESULT res;
|
||||
@ -392,27 +392,27 @@ static HRESULT WINAPI Deinterlace_16_to_32(LPDIRECTDRAWSURFACE lpddsdst, LPRECT
|
||||
h = lpdestrect->bottom - lpdestrect->top;
|
||||
|
||||
memset(&ddsd_dst,0,sizeof(DDSURFACEDESC2));
|
||||
ddsd_dst.dwSize = Set_dwSize_From_Surface(lpddsdst);
|
||||
ddsd_dst.dwSize = Set_dwSize_From_Surface();
|
||||
ddsd_dst.dwFlags = DDSD_LPSURFACE | DDSD_PITCH;
|
||||
if(res=(*pLock)(lpddsdst, 0, (LPDDSURFACEDESC)&ddsd_dst, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
if(res=(*pLockMethod())(lpddsdst, 0, (LPDDSURFACEDESC)&ddsd_dst, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
OutTraceE("EmuBlt16_32: Lock ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
|
||||
memset(&ddsd_src,0,sizeof(DDSURFACEDESC2));
|
||||
ddsd_src.dwSize = Set_dwSize_From_Surface(lpddssrc);
|
||||
ddsd_src.dwSize = Set_dwSize_From_Surface();
|
||||
ddsd_src.dwFlags = DDSD_LPSURFACE | DDSD_PITCH;
|
||||
if (lpsurface) { // already locked, just get info ....
|
||||
if(res=lpddssrc->GetSurfaceDesc((LPDDSURFACEDESC)&ddsd_src)) {
|
||||
OutTraceE("EmuBlt16_32: GetSurfaceDesc ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
(*pUnlockMethod(lpddsdst))(lpddsdst, lpdestrect);
|
||||
(*pUnlockMethod(lpddssrc))(lpddssrc, lpsrcrect);
|
||||
(*pUnlockMethod())(lpddsdst, lpdestrect);
|
||||
(*pUnlockMethod())(lpddssrc, lpsrcrect);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(res=(*pLock)(lpddssrc, 0, (LPDDSURFACEDESC)&ddsd_src, DDLOCK_SURFACEMEMORYPTR|DDLOCK_READONLY|DDLOCK_WAIT, 0)) {
|
||||
(*pUnlockMethod(lpddsdst))(lpddsdst,0);
|
||||
if(res=(*pLockMethod())(lpddssrc, 0, (LPDDSURFACEDESC)&ddsd_src, DDLOCK_SURFACEMEMORYPTR|DDLOCK_READONLY|DDLOCK_WAIT, 0)) {
|
||||
(*pUnlockMethod())(lpddsdst,0);
|
||||
OutTraceE("EmuBlt16_32: Lock ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
@ -472,14 +472,14 @@ static HRESULT WINAPI Deinterlace_16_to_32(LPDIRECTDRAWSURFACE lpddsdst, LPRECT
|
||||
|
||||
if(dxw.dwFlags3 & MARKBLIT) MarkRect32(dest0, w, h, destpitch);
|
||||
|
||||
res=(*pUnlockMethod(lpddsdst))(lpddsdst, lpdestrect);
|
||||
res=(*pUnlockMethod())(lpddsdst, lpdestrect);
|
||||
if (res) OutTraceE("EmuBlt16_32: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddsdst, res, ExplainDDError(res), __LINE__);
|
||||
res=(*pUnlockMethod(lpddssrc))(lpddssrc, lpsrcrect);
|
||||
res=(*pUnlockMethod())(lpddssrc, lpsrcrect);
|
||||
if (res) OutTraceE("EmuBlt16_32: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddssrc, res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BilinearBlt_16_to_32(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdestrect,
|
||||
static HRESULT WINAPI BilinearBlt_16_to_32(int dxversion, Blt_Type pBlt, LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdestrect,
|
||||
LPDIRECTDRAWSURFACE lpddssrc, LPRECT lpsrcrect, DWORD dwflags, LPVOID lpsurface)
|
||||
{
|
||||
HRESULT res;
|
||||
@ -498,27 +498,27 @@ static HRESULT WINAPI BilinearBlt_16_to_32(LPDIRECTDRAWSURFACE lpddsdst, LPRECT
|
||||
lpdestrect->bottom <<= 1;
|
||||
|
||||
memset(&ddsd_dst,0,sizeof(DDSURFACEDESC2));
|
||||
ddsd_dst.dwSize = Set_dwSize_From_Surface(lpddsdst);
|
||||
ddsd_dst.dwSize = Set_dwSize_From_Surface();
|
||||
ddsd_dst.dwFlags = DDSD_LPSURFACE | DDSD_PITCH;
|
||||
if(res=(*pLock)(lpddsdst, 0, (LPDDSURFACEDESC)&ddsd_dst, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
if(res=(*pLockMethod())(lpddsdst, 0, (LPDDSURFACEDESC)&ddsd_dst, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
OutTraceE("BilBlt16_32: Lock ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
|
||||
memset(&ddsd_src,0,sizeof(DDSURFACEDESC2));
|
||||
ddsd_src.dwSize = Set_dwSize_From_Surface(lpddssrc);
|
||||
ddsd_src.dwSize = Set_dwSize_From_Surface();
|
||||
ddsd_src.dwFlags = DDSD_LPSURFACE | DDSD_PITCH;
|
||||
if (lpsurface) { // already locked, just get info ....
|
||||
if(res=lpddssrc->GetSurfaceDesc((LPDDSURFACEDESC)&ddsd_src)) {
|
||||
OutTraceE("BilBlt16_32: GetSurfaceDesc ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
(*pUnlockMethod(lpddsdst))(lpddsdst, lpdestrect);
|
||||
(*pUnlockMethod(lpddssrc))(lpddssrc, lpsrcrect);
|
||||
(*pUnlockMethod())(lpddsdst, lpdestrect);
|
||||
(*pUnlockMethod())(lpddssrc, lpsrcrect);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(res=(*pLock)(lpddssrc, 0, (LPDDSURFACEDESC)&ddsd_src, DDLOCK_SURFACEMEMORYPTR|DDLOCK_READONLY|DDLOCK_WAIT, 0)) {
|
||||
(*pUnlockMethod(lpddsdst))(lpddsdst,0);
|
||||
if(res=(*pLockMethod())(lpddssrc, 0, (LPDDSURFACEDESC)&ddsd_src, DDLOCK_SURFACEMEMORYPTR|DDLOCK_READONLY|DDLOCK_WAIT, 0)) {
|
||||
(*pUnlockMethod())(lpddsdst,0);
|
||||
OutTraceE("BilBlt16_32: Lock ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
@ -573,14 +573,14 @@ static HRESULT WINAPI BilinearBlt_16_to_32(LPDIRECTDRAWSURFACE lpddsdst, LPRECT
|
||||
|
||||
if(dxw.dwFlags3 & MARKBLIT) MarkRect32(dest0, 2*w, 2*h, destpitch);
|
||||
|
||||
res=(*pUnlockMethod(lpddsdst))(lpddsdst, lpdestrect);
|
||||
res=(*pUnlockMethod())(lpddsdst, lpdestrect);
|
||||
if (res) OutTraceE("BilBlt16_32: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddsdst, res, ExplainDDError(res), __LINE__);
|
||||
res=(*pUnlockMethod(lpddssrc))(lpddssrc, lpsrcrect);
|
||||
res=(*pUnlockMethod())(lpddssrc, lpsrcrect);
|
||||
if (res) OutTraceE("BilBlt16_32: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddssrc, res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI EmuBlt_24_to_32(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdestrect,
|
||||
static HRESULT WINAPI EmuBlt_24_to_32(int dxversion, Blt_Type pBlt, LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdestrect,
|
||||
LPDIRECTDRAWSURFACE lpddssrc, LPRECT lpsrcrect, DWORD dwflags, LPVOID lpsurface)
|
||||
{
|
||||
HRESULT res;
|
||||
@ -594,27 +594,27 @@ static HRESULT WINAPI EmuBlt_24_to_32(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdes
|
||||
h = lpdestrect->bottom - lpdestrect->top;
|
||||
|
||||
memset(&ddsd_dst,0,sizeof(DDSURFACEDESC2));
|
||||
ddsd_dst.dwSize = Set_dwSize_From_Surface(lpddsdst);
|
||||
ddsd_dst.dwSize = Set_dwSize_From_Surface();
|
||||
ddsd_dst.dwFlags = DDSD_LPSURFACE | DDSD_PITCH;
|
||||
if(res=(*pLock)(lpddsdst, 0, (LPDDSURFACEDESC)&ddsd_dst, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
if(res=(*pLockMethod())(lpddsdst, 0, (LPDDSURFACEDESC)&ddsd_dst, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
OutTraceE("EmuBlt24_32: Lock ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
|
||||
memset(&ddsd_src,0,sizeof(DDSURFACEDESC2));
|
||||
ddsd_src.dwSize = Set_dwSize_From_Surface(lpddssrc);
|
||||
ddsd_src.dwSize = Set_dwSize_From_Surface();
|
||||
ddsd_src.dwFlags = DDSD_LPSURFACE | DDSD_PITCH;
|
||||
if (lpsurface) { // already locked, just get info ....
|
||||
if(res=lpddssrc->GetSurfaceDesc((LPDDSURFACEDESC)&ddsd_src)) {
|
||||
OutTraceE("EmuBlt24_32: GetSurfaceDesc ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
(*pUnlockMethod(lpddsdst))(lpddsdst, lpdestrect);
|
||||
(*pUnlockMethod(lpddssrc))(lpddssrc, lpsrcrect);
|
||||
(*pUnlockMethod())(lpddsdst, lpdestrect);
|
||||
(*pUnlockMethod())(lpddssrc, lpsrcrect);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(res=(*pLock)(lpddssrc, 0, (LPDDSURFACEDESC)&ddsd_src, DDLOCK_SURFACEMEMORYPTR|DDLOCK_READONLY, 0)) {
|
||||
(*pUnlockMethod(lpddsdst))(lpddsdst,0);
|
||||
if(res=(*pLockMethod())(lpddssrc, 0, (LPDDSURFACEDESC)&ddsd_src, DDLOCK_SURFACEMEMORYPTR|DDLOCK_READONLY, 0)) {
|
||||
(*pUnlockMethod())(lpddsdst,0);
|
||||
OutTraceE("EmuBlt24_32: Lock ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
@ -647,9 +647,9 @@ static HRESULT WINAPI EmuBlt_24_to_32(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdes
|
||||
|
||||
if(dxw.dwFlags3 & MARKBLIT) MarkRect32(dest0, w, h, destpitch);
|
||||
|
||||
res=(*pUnlockMethod(lpddsdst))(lpddsdst, lpdestrect);
|
||||
res=(*pUnlockMethod())(lpddsdst, lpdestrect);
|
||||
if (res) OutTraceE("EmuBlt24_32: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddsdst, res, ExplainDDError(res), __LINE__);
|
||||
res=(*pUnlockMethod(lpddssrc))(lpddssrc, lpsrcrect);
|
||||
res=(*pUnlockMethod())(lpddssrc, lpsrcrect);
|
||||
if (res) OutTraceE("EmuBlt24_32: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddssrc, res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
@ -657,7 +657,7 @@ static HRESULT WINAPI EmuBlt_24_to_32(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdes
|
||||
// note: better avoid direct blitting in case of identical color depth (e.g. EmuBlt_32_to_32, EmuBlt_16_to_16)
|
||||
// because it does not work between complex surfaces when DDSDCAPS_SYSTEMMEMORY is not omogeneous!
|
||||
|
||||
static HRESULT WINAPI EmuBlt_32_to_32(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdestrect,
|
||||
static HRESULT WINAPI EmuBlt_32_to_32(int dxversion, Blt_Type pBlt, LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdestrect,
|
||||
LPDIRECTDRAWSURFACE lpddssrc, LPRECT lpsrcrect, DWORD dwflags, LPVOID lpsurface)
|
||||
{
|
||||
DWORD x, y, w, h;
|
||||
@ -671,27 +671,27 @@ static HRESULT WINAPI EmuBlt_32_to_32(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdes
|
||||
h = lpdestrect->bottom - lpdestrect->top;
|
||||
|
||||
memset(&ddsd_dst,0,sizeof(DDSURFACEDESC2));
|
||||
ddsd_dst.dwSize = Set_dwSize_From_Surface(lpddsdst);
|
||||
ddsd_dst.dwSize = Set_dwSize_From_Surface();
|
||||
ddsd_dst.dwFlags = DDSD_LPSURFACE | DDSD_PITCH;
|
||||
if(res=(*pLock)(lpddsdst, 0, (LPDDSURFACEDESC)&ddsd_dst, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
if(res=(*pLockMethod())(lpddsdst, 0, (LPDDSURFACEDESC)&ddsd_dst, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
OutTraceE("EmuBlt32_32: Lock ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
|
||||
memset(&ddsd_src,0,sizeof(DDSURFACEDESC2));
|
||||
ddsd_src.dwSize = Set_dwSize_From_Surface(lpddssrc);
|
||||
ddsd_src.dwSize = Set_dwSize_From_Surface();
|
||||
ddsd_src.dwFlags = DDSD_LPSURFACE | DDSD_PITCH;
|
||||
if (lpsurface) { // already locked, just get info ....
|
||||
if(res=lpddssrc->GetSurfaceDesc((LPDDSURFACEDESC)&ddsd_src)) {
|
||||
OutTraceE("EmuBlt32_32: GetSurfaceDesc ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
(*pUnlockMethod(lpddsdst))(lpddsdst, lpdestrect);
|
||||
(*pUnlockMethod(lpddssrc))(lpddssrc, lpsrcrect);
|
||||
(*pUnlockMethod())(lpddsdst, lpdestrect);
|
||||
(*pUnlockMethod())(lpddssrc, lpsrcrect);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(res=(*pLock)(lpddssrc, 0, (LPDDSURFACEDESC)&ddsd_src, DDLOCK_SURFACEMEMORYPTR|DDLOCK_READONLY, 0)) {
|
||||
(*pUnlockMethod(lpddsdst))(lpddsdst,0);
|
||||
if(res=(*pLockMethod())(lpddssrc, 0, (LPDDSURFACEDESC)&ddsd_src, DDLOCK_SURFACEMEMORYPTR|DDLOCK_READONLY, 0)) {
|
||||
(*pUnlockMethod())(lpddsdst,0);
|
||||
OutTraceE("EmuBlt32_32: Lock ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
@ -721,14 +721,14 @@ static HRESULT WINAPI EmuBlt_32_to_32(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdes
|
||||
|
||||
if(dxw.dwFlags3 & MARKBLIT) MarkRect32(dest0, w, h, destpitch);
|
||||
|
||||
res=(*pUnlockMethod(lpddsdst))(lpddsdst,lpdestrect);
|
||||
res=(*pUnlockMethod())(lpddsdst,lpdestrect);
|
||||
if (res) OutTraceE("EmuBlt32_32: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddsdst, res, ExplainDDError(res), __LINE__);
|
||||
res=(*pUnlockMethod(lpddssrc))(lpddssrc, lpsrcrect);
|
||||
res=(*pUnlockMethod())(lpddssrc, lpsrcrect);
|
||||
if (res) OutTraceE("EmuBlt32_32: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddssrc, res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI EmuBlt_8_to_16(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdestrect,
|
||||
static HRESULT WINAPI EmuBlt_8_to_16(int dxversion, Blt_Type pBlt, LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdestrect,
|
||||
LPDIRECTDRAWSURFACE lpddssrc, LPRECT lpsrcrect, DWORD dwflags, LPVOID lpsurface)
|
||||
{
|
||||
HRESULT res;
|
||||
@ -742,27 +742,27 @@ static HRESULT WINAPI EmuBlt_8_to_16(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdest
|
||||
h = lpdestrect->bottom - lpdestrect->top;
|
||||
|
||||
memset(&ddsd_dst,0,sizeof(DDSURFACEDESC2));
|
||||
ddsd_dst.dwSize = Set_dwSize_From_Surface(lpddsdst);
|
||||
ddsd_dst.dwSize = Set_dwSize_From_Surface();
|
||||
ddsd_dst.dwFlags = DDSD_LPSURFACE | DDSD_PITCH;
|
||||
if(res=(*pLock)(lpddsdst, 0, (LPDDSURFACEDESC)&ddsd_dst, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
if(res=(*pLockMethod())(lpddsdst, 0, (LPDDSURFACEDESC)&ddsd_dst, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
OutTraceE("EmuBlt8_16: Lock ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
|
||||
memset(&ddsd_src,0,sizeof(DDSURFACEDESC2));
|
||||
ddsd_src.dwSize = Set_dwSize_From_Surface(lpddssrc);
|
||||
ddsd_src.dwSize = Set_dwSize_From_Surface();
|
||||
ddsd_src.dwFlags = DDSD_LPSURFACE | DDSD_PITCH;
|
||||
if (lpsurface) { // already locked, just get info ....
|
||||
if(res=lpddssrc->GetSurfaceDesc((LPDDSURFACEDESC)&ddsd_src)) {
|
||||
OutTraceE("EmuBlt8_16: GetSurfaceDesc ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
(*pUnlockMethod(lpddsdst))(lpddsdst, lpdestrect);
|
||||
(*pUnlockMethod(lpddssrc))(lpddssrc, lpsrcrect);
|
||||
(*pUnlockMethod())(lpddsdst, lpdestrect);
|
||||
(*pUnlockMethod())(lpddssrc, lpsrcrect);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(res=(*pLock)(lpddssrc, 0, (LPDDSURFACEDESC)&ddsd_src, DDLOCK_SURFACEMEMORYPTR|DDLOCK_READONLY, 0)) {
|
||||
(*pUnlockMethod(lpddsdst))(lpddsdst,0);
|
||||
if(res=(*pLockMethod())(lpddssrc, 0, (LPDDSURFACEDESC)&ddsd_src, DDLOCK_SURFACEMEMORYPTR|DDLOCK_READONLY, 0)) {
|
||||
(*pUnlockMethod())(lpddsdst,0);
|
||||
OutTraceE("EmuBlt8_16: Lock ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return 0;
|
||||
}
|
||||
@ -792,14 +792,14 @@ static HRESULT WINAPI EmuBlt_8_to_16(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdest
|
||||
|
||||
if(dxw.dwFlags3 & MARKBLIT) MarkRect16(dest0, w, h, destpitch);
|
||||
|
||||
res=(*pUnlockMethod(lpddsdst))(lpddsdst, lpdestrect);
|
||||
res=(*pUnlockMethod())(lpddsdst, lpdestrect);
|
||||
if (res) OutTraceE("EmuBlt8_16: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddsdst, res, ExplainDDError(res), __LINE__);
|
||||
res=(*pUnlockMethod(lpddssrc))(lpddssrc, lpsrcrect);
|
||||
res=(*pUnlockMethod())(lpddssrc, lpsrcrect);
|
||||
if (res) OutTraceE("EmuBlt8_16: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddssrc, res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BilinearBlt_8_to_16(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdestrect,
|
||||
static HRESULT WINAPI BilinearBlt_8_to_16(int dxversion, Blt_Type pBlt, LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdestrect,
|
||||
LPDIRECTDRAWSURFACE lpddssrc, LPRECT lpsrcrect, DWORD dwflags, LPVOID lpsurface)
|
||||
{
|
||||
HRESULT res;
|
||||
@ -820,9 +820,9 @@ static HRESULT WINAPI BilinearBlt_8_to_16(LPDIRECTDRAWSURFACE lpddsdst, LPRECT l
|
||||
lpdestrect->bottom <<= 1;
|
||||
|
||||
memset(&ddsd_dst,0,sizeof(DDSURFACEDESC2));
|
||||
ddsd_dst.dwSize = Set_dwSize_From_Surface(lpddsdst);
|
||||
ddsd_dst.dwSize = Set_dwSize_From_Surface();
|
||||
ddsd_dst.dwFlags = DDSD_LPSURFACE | DDSD_PITCH;
|
||||
if(res=(*pLock)(lpddsdst, 0, (LPDDSURFACEDESC)&ddsd_dst, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
if(res=(*pLockMethod())(lpddsdst, 0, (LPDDSURFACEDESC)&ddsd_dst, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
OutTraceE("BilBlt8_16: Lock ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
@ -830,19 +830,19 @@ static HRESULT WINAPI BilinearBlt_8_to_16(LPDIRECTDRAWSURFACE lpddsdst, LPRECT l
|
||||
Melt16 = (ddsd_dst.ddpfPixelFormat.dwGBitMask == 0x3E0) ? Melt16_555 : Melt16_565;
|
||||
|
||||
memset(&ddsd_src,0,sizeof(DDSURFACEDESC2));
|
||||
ddsd_src.dwSize = Set_dwSize_From_Surface(lpddssrc);
|
||||
ddsd_src.dwSize = Set_dwSize_From_Surface();
|
||||
ddsd_src.dwFlags = DDSD_LPSURFACE | DDSD_PITCH;
|
||||
if (lpsurface) { // already locked, just get info ....
|
||||
if(res=lpddssrc->GetSurfaceDesc((LPDDSURFACEDESC)&ddsd_src)) {
|
||||
OutTraceE("BilBlt8_16: GetSurfaceDesc ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
(*pUnlockMethod(lpddsdst))(lpddsdst, lpdestrect);
|
||||
(*pUnlockMethod(lpddssrc))(lpddssrc, lpsrcrect);
|
||||
(*pUnlockMethod())(lpddsdst, lpdestrect);
|
||||
(*pUnlockMethod())(lpddssrc, lpsrcrect);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(res=(*pLock)(lpddssrc, 0, (LPDDSURFACEDESC)&ddsd_src, DDLOCK_SURFACEMEMORYPTR|DDLOCK_READONLY, 0)) {
|
||||
(*pUnlockMethod(lpddsdst))(lpddsdst,0);
|
||||
if(res=(*pLockMethod())(lpddssrc, 0, (LPDDSURFACEDESC)&ddsd_src, DDLOCK_SURFACEMEMORYPTR|DDLOCK_READONLY, 0)) {
|
||||
(*pUnlockMethod())(lpddsdst,0);
|
||||
OutTraceE("BilBlt8_16: Lock ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return 0;
|
||||
}
|
||||
@ -894,14 +894,14 @@ static HRESULT WINAPI BilinearBlt_8_to_16(LPDIRECTDRAWSURFACE lpddsdst, LPRECT l
|
||||
|
||||
if(dxw.dwFlags3 & MARKBLIT) MarkRect16(dest0, 2*w, 2*h, destpitch);
|
||||
|
||||
res=(*pUnlockMethod(lpddsdst))(lpddsdst, lpdestrect);
|
||||
res=(*pUnlockMethod())(lpddsdst, lpdestrect);
|
||||
if (res) OutTraceE("BilBlt8_16: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddsdst, res, ExplainDDError(res), __LINE__);
|
||||
res=(*pUnlockMethod(lpddssrc))(lpddssrc, lpsrcrect);
|
||||
res=(*pUnlockMethod())(lpddssrc, lpsrcrect);
|
||||
if (res) OutTraceE("BilBlt8_16: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddssrc, res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI EmuBlt_16_to_16(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdestrect,
|
||||
static HRESULT WINAPI EmuBlt_16_to_16(int dxversion, Blt_Type pBlt, LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdestrect,
|
||||
LPDIRECTDRAWSURFACE lpddssrc, LPRECT lpsrcrect, DWORD dwflags, LPVOID lpsurface)
|
||||
{
|
||||
#if 0
|
||||
@ -919,27 +919,27 @@ static HRESULT WINAPI EmuBlt_16_to_16(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdes
|
||||
h = lpdestrect->bottom - lpdestrect->top;
|
||||
|
||||
memset(&ddsd_dst,0,sizeof(DDSURFACEDESC2));
|
||||
ddsd_dst.dwSize = Set_dwSize_From_Surface(lpddsdst);
|
||||
ddsd_dst.dwSize = Set_dwSize_From_Surface();
|
||||
ddsd_dst.dwFlags = DDSD_LPSURFACE | DDSD_PITCH;
|
||||
if(res=(*pLock)(lpddsdst, 0, (LPDDSURFACEDESC)&ddsd_dst, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
if(res=(*pLockMethod())(lpddsdst, 0, (LPDDSURFACEDESC)&ddsd_dst, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
OutTraceE("EmuBlt16_16: Lock ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
|
||||
memset(&ddsd_src,0,sizeof(DDSURFACEDESC2));
|
||||
ddsd_src.dwSize = Set_dwSize_From_Surface(lpddssrc);
|
||||
ddsd_src.dwSize = Set_dwSize_From_Surface();
|
||||
ddsd_src.dwFlags = DDSD_LPSURFACE | DDSD_PITCH;
|
||||
if (lpsurface) { // already locked, just get info ....
|
||||
if(res=lpddssrc->GetSurfaceDesc((LPDDSURFACEDESC)&ddsd_src)) {
|
||||
OutTraceE("EmuBlt16_16: GetSurfaceDesc ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
(*pUnlockMethod(lpddsdst))(lpddsdst, lpdestrect);
|
||||
(*pUnlockMethod(lpddssrc))(lpddssrc, lpsrcrect);
|
||||
(*pUnlockMethod())(lpddsdst, lpdestrect);
|
||||
(*pUnlockMethod())(lpddssrc, lpsrcrect);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(res=(*pLock)(lpddssrc, 0, (LPDDSURFACEDESC)&ddsd_src, DDLOCK_SURFACEMEMORYPTR|DDLOCK_READONLY, 0)) {
|
||||
(*pUnlockMethod(lpddsdst))(lpddsdst,0);
|
||||
if(res=(*pLockMethod())(lpddssrc, 0, (LPDDSURFACEDESC)&ddsd_src, DDLOCK_SURFACEMEMORYPTR|DDLOCK_READONLY, 0)) {
|
||||
(*pUnlockMethod())(lpddsdst,0);
|
||||
OutTraceE("EmuBlt16_16: Lock ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return 0;
|
||||
}
|
||||
@ -999,14 +999,14 @@ static HRESULT WINAPI EmuBlt_16_to_16(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdes
|
||||
|
||||
if(dxw.dwFlags3 & MARKBLIT) MarkRect16(dest0, w, h, destpitch);
|
||||
|
||||
res=(*pUnlockMethod(lpddsdst))(lpddsdst, lpdestrect);
|
||||
res=(*pUnlockMethod())(lpddsdst, lpdestrect);
|
||||
if (res) OutTraceE("EmuBlt16_16: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddsdst, res, ExplainDDError(res), __LINE__);
|
||||
res=(*pUnlockMethod(lpddssrc))(lpddssrc, lpsrcrect);
|
||||
res=(*pUnlockMethod())(lpddssrc, lpsrcrect);
|
||||
if (res) OutTraceE("EmuBlt16_16: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddssrc, res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BilinearBlt_16_to_16(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdestrect,
|
||||
static HRESULT WINAPI BilinearBlt_16_to_16(int dxversion, Blt_Type pBlt, LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdestrect,
|
||||
LPDIRECTDRAWSURFACE lpddssrc, LPRECT lpsrcrect, DWORD dwflags, LPVOID lpsurface)
|
||||
{
|
||||
HRESULT res;
|
||||
@ -1027,9 +1027,9 @@ static HRESULT WINAPI BilinearBlt_16_to_16(LPDIRECTDRAWSURFACE lpddsdst, LPRECT
|
||||
lpdestrect->bottom <<= 1;
|
||||
|
||||
memset(&ddsd_dst,0,sizeof(DDSURFACEDESC2));
|
||||
ddsd_dst.dwSize = Set_dwSize_From_Surface(lpddsdst);
|
||||
ddsd_dst.dwSize = Set_dwSize_From_Surface();
|
||||
ddsd_dst.dwFlags = DDSD_LPSURFACE | DDSD_PITCH;
|
||||
if(res=(*pLock)(lpddsdst, 0, (LPDDSURFACEDESC)&ddsd_dst, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
if(res=(*pLockMethod())(lpddsdst, 0, (LPDDSURFACEDESC)&ddsd_dst, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
OutTraceE("BilBlt16_16: Lock ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
@ -1037,19 +1037,19 @@ static HRESULT WINAPI BilinearBlt_16_to_16(LPDIRECTDRAWSURFACE lpddsdst, LPRECT
|
||||
Melt16 = (ddsd_dst.ddpfPixelFormat.dwGBitMask == 0x3E0) ? Melt16_555 : Melt16_565;
|
||||
|
||||
memset(&ddsd_src,0,sizeof(DDSURFACEDESC2));
|
||||
ddsd_src.dwSize = Set_dwSize_From_Surface(lpddssrc);
|
||||
ddsd_src.dwSize = Set_dwSize_From_Surface();
|
||||
ddsd_src.dwFlags = DDSD_LPSURFACE | DDSD_PITCH;
|
||||
if (lpsurface) { // already locked, just get info ....
|
||||
if(res=lpddssrc->GetSurfaceDesc((LPDDSURFACEDESC)&ddsd_src)) {
|
||||
OutTraceE("BilBlt16_16: GetSurfaceDesc ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
(*pUnlockMethod(lpddsdst))(lpddsdst, lpdestrect);
|
||||
(*pUnlockMethod(lpddssrc))(lpddssrc, lpsrcrect);
|
||||
(*pUnlockMethod())(lpddsdst, lpdestrect);
|
||||
(*pUnlockMethod())(lpddssrc, lpsrcrect);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(res=(*pLock)(lpddssrc, 0, (LPDDSURFACEDESC)&ddsd_src, DDLOCK_SURFACEMEMORYPTR|DDLOCK_READONLY|DDLOCK_WAIT, 0)) {
|
||||
(*pUnlockMethod(lpddsdst))(lpddsdst,0);
|
||||
if(res=(*pLockMethod())(lpddssrc, 0, (LPDDSURFACEDESC)&ddsd_src, DDLOCK_SURFACEMEMORYPTR|DDLOCK_READONLY|DDLOCK_WAIT, 0)) {
|
||||
(*pUnlockMethod())(lpddsdst,0);
|
||||
OutTraceE("BilBlt16_16: Lock ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
@ -1102,15 +1102,15 @@ static HRESULT WINAPI BilinearBlt_16_to_16(LPDIRECTDRAWSURFACE lpddsdst, LPRECT
|
||||
|
||||
if(dxw.dwFlags3 & MARKBLIT) MarkRect16((SHORT *)dest0, 2*w, 2*h, destpitch);
|
||||
|
||||
res=(*pUnlockMethod(lpddsdst))(lpddsdst, lpdestrect);
|
||||
res=(*pUnlockMethod())(lpddsdst, lpdestrect);
|
||||
if (res) OutTraceE("BilBlt16_16: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddsdst, res, ExplainDDError(res), __LINE__);
|
||||
res=(*pUnlockMethod(lpddssrc))(lpddssrc, lpsrcrect);
|
||||
res=(*pUnlockMethod())(lpddssrc, lpsrcrect);
|
||||
if (res) OutTraceE("BilBlt16_16: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddssrc, res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
static HRESULT WINAPI EmuBlt_24_to_16(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdestrect,
|
||||
static HRESULT WINAPI EmuBlt_24_to_16(int dxversion, Blt_Type pBlt, LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdestrect,
|
||||
LPDIRECTDRAWSURFACE lpddssrc, LPRECT lpsrcrect, DWORD dwflags, LPVOID lpsurface)
|
||||
{
|
||||
HRESULT res;
|
||||
@ -1124,27 +1124,27 @@ static HRESULT WINAPI EmuBlt_24_to_16(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdes
|
||||
h = lpdestrect->bottom - lpdestrect->top;
|
||||
|
||||
memset(&ddsd_dst,0,sizeof(DDSURFACEDESC2));
|
||||
ddsd_dst.dwSize = Set_dwSize_From_Surface(lpddsdst);
|
||||
ddsd_dst.dwSize = Set_dwSize_From_Surface();
|
||||
ddsd_dst.dwFlags = DDSD_LPSURFACE | DDSD_PITCH;
|
||||
if(res=(*pLock)(lpddsdst, 0, (LPDDSURFACEDESC)&ddsd_dst, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
if(res=(*pLockMethod())(lpddsdst, 0, (LPDDSURFACEDESC)&ddsd_dst, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
OutTraceE("EmuBlt24_16: Lock ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
|
||||
memset(&ddsd_src,0,sizeof(DDSURFACEDESC2));
|
||||
ddsd_src.dwSize = Set_dwSize_From_Surface(lpddssrc);
|
||||
ddsd_src.dwSize = Set_dwSize_From_Surface();
|
||||
ddsd_src.dwFlags = DDSD_LPSURFACE | DDSD_PITCH;
|
||||
if (lpsurface) { // already locked, just get info ....
|
||||
if(res=lpddssrc->GetSurfaceDesc((LPDDSURFACEDESC)&ddsd_src)) {
|
||||
OutTraceE("EmuBlt24_16: GetSurfaceDesc ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
(*pUnlockMethod(lpddsdst))(lpddsdst, lpdestrect);
|
||||
(*pUnlockMethod(lpddssrc))(lpddssrc, lpsrcrect);
|
||||
(*pUnlockMethod())(lpddsdst, lpdestrect);
|
||||
(*pUnlockMethod())(lpddssrc, lpsrcrect);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(res=(*pLock)(lpddssrc, 0, (LPDDSURFACEDESC)&ddsd_src, DDLOCK_SURFACEMEMORYPTR|DDLOCK_READONLY, 0)) {
|
||||
(*pUnlockMethod(lpddsdst))(lpddsdst,0);
|
||||
if(res=(*pLockMethod())(lpddssrc, 0, (LPDDSURFACEDESC)&ddsd_src, DDLOCK_SURFACEMEMORYPTR|DDLOCK_READONLY, 0)) {
|
||||
(*pUnlockMethod())(lpddsdst,0);
|
||||
OutTraceE("EmuBlt24_16: Lock ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return 0;
|
||||
}
|
||||
@ -1174,14 +1174,14 @@ static HRESULT WINAPI EmuBlt_24_to_16(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdes
|
||||
|
||||
if(dxw.dwFlags3 & MARKBLIT) MarkRect16(dest0, w, h, destpitch);
|
||||
|
||||
res=(*pUnlockMethod(lpddsdst))(lpddsdst, lpdestrect);
|
||||
res=(*pUnlockMethod())(lpddsdst, lpdestrect);
|
||||
if (res) OutTraceE("EmuBlt24_16: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddsdst, res, ExplainDDError(res), __LINE__);
|
||||
res=(*pUnlockMethod(lpddssrc))(lpddssrc, lpsrcrect);
|
||||
res=(*pUnlockMethod())(lpddssrc, lpsrcrect);
|
||||
if (res) OutTraceE("EmuBlt24_16: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddssrc, res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI EmuBlt_32_to_16(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdestrect,
|
||||
static HRESULT WINAPI EmuBlt_32_to_16(int dxversion, Blt_Type pBlt, LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdestrect,
|
||||
LPDIRECTDRAWSURFACE lpddssrc, LPRECT lpsrcrect, DWORD dwflags, LPVOID lpsurface)
|
||||
{
|
||||
HRESULT res;
|
||||
@ -1195,27 +1195,27 @@ static HRESULT WINAPI EmuBlt_32_to_16(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdes
|
||||
h = lpdestrect->bottom - lpdestrect->top;
|
||||
|
||||
memset(&ddsd_dst,0,sizeof(DDSURFACEDESC2));
|
||||
ddsd_dst.dwSize = Set_dwSize_From_Surface(lpddsdst);
|
||||
ddsd_dst.dwSize = Set_dwSize_From_Surface();
|
||||
ddsd_dst.dwFlags = DDSD_LPSURFACE | DDSD_PITCH;
|
||||
if(res=(*pLock)(lpddsdst, 0, (LPDDSURFACEDESC)&ddsd_dst, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
if(res=(*pLockMethod())(lpddsdst, 0, (LPDDSURFACEDESC)&ddsd_dst, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
OutTraceE("EmuBlt32_16: Lock ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
|
||||
memset(&ddsd_src,0,sizeof(DDSURFACEDESC2));
|
||||
ddsd_src.dwSize = Set_dwSize_From_Surface(lpddssrc);
|
||||
ddsd_src.dwSize = Set_dwSize_From_Surface();
|
||||
ddsd_src.dwFlags = DDSD_LPSURFACE | DDSD_PITCH;
|
||||
if (lpsurface) { // already locked, just get info ....
|
||||
if(res=lpddssrc->GetSurfaceDesc((LPDDSURFACEDESC)&ddsd_src)) {
|
||||
OutTraceE("EmuBlt32_16: GetSurfaceDesc ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
(*pUnlockMethod(lpddsdst))(lpddsdst, lpdestrect);
|
||||
(*pUnlockMethod(lpddssrc))(lpddssrc, lpsrcrect);
|
||||
(*pUnlockMethod())(lpddsdst, lpdestrect);
|
||||
(*pUnlockMethod())(lpddssrc, lpsrcrect);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(res=(*pLock)(lpddssrc, 0, (LPDDSURFACEDESC)&ddsd_src, DDLOCK_SURFACEMEMORYPTR|DDLOCK_READONLY, 0)) {
|
||||
(*pUnlockMethod(lpddsdst))(lpddsdst,0);
|
||||
if(res=(*pLockMethod())(lpddssrc, 0, (LPDDSURFACEDESC)&ddsd_src, DDLOCK_SURFACEMEMORYPTR|DDLOCK_READONLY, 0)) {
|
||||
(*pUnlockMethod())(lpddsdst,0);
|
||||
OutTraceE("EmuBlt32_16: Lock ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return 0;
|
||||
}
|
||||
@ -1245,14 +1245,14 @@ static HRESULT WINAPI EmuBlt_32_to_16(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdes
|
||||
|
||||
if(dxw.dwFlags3 & MARKBLIT) MarkRect16(dest0, w, h, destpitch);
|
||||
|
||||
res=(*pUnlockMethod(lpddsdst))(lpddsdst, lpdestrect);
|
||||
res=(*pUnlockMethod())(lpddsdst, lpdestrect);
|
||||
if (res) OutTraceE("EmuBlt32_16: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddsdst, res, ExplainDDError(res), __LINE__);
|
||||
res=(*pUnlockMethod(lpddssrc))(lpddssrc, lpsrcrect);
|
||||
res=(*pUnlockMethod())(lpddssrc, lpsrcrect);
|
||||
if (res) OutTraceE("EmuBlt32_16: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddssrc, res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BilinearBlt_32_to_32(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdestrect,
|
||||
static HRESULT WINAPI BilinearBlt_32_to_32(int dxversion, Blt_Type pBlt, LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdestrect,
|
||||
LPDIRECTDRAWSURFACE lpddssrc, LPRECT lpsrcrect, DWORD dwflags, LPVOID lpsurface)
|
||||
{
|
||||
HRESULT res;
|
||||
@ -1271,27 +1271,27 @@ static HRESULT WINAPI BilinearBlt_32_to_32(LPDIRECTDRAWSURFACE lpddsdst, LPRECT
|
||||
lpdestrect->bottom <<= 1;
|
||||
|
||||
memset(&ddsd_dst,0,sizeof(DDSURFACEDESC2));
|
||||
ddsd_dst.dwSize = Set_dwSize_From_Surface(lpddsdst);
|
||||
ddsd_dst.dwSize = Set_dwSize_From_Surface();
|
||||
ddsd_dst.dwFlags = DDSD_LPSURFACE | DDSD_PITCH;
|
||||
if(res=(*pLock)(lpddsdst, 0, (LPDDSURFACEDESC)&ddsd_dst, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
if(res=(*pLockMethod())(lpddsdst, 0, (LPDDSURFACEDESC)&ddsd_dst, DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY|DDLOCK_WAIT, 0)){
|
||||
OutTraceE("BilBlt32_32: Lock ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
|
||||
memset(&ddsd_src,0,sizeof(DDSURFACEDESC2));
|
||||
ddsd_src.dwSize = Set_dwSize_From_Surface(lpddssrc);
|
||||
ddsd_src.dwSize = Set_dwSize_From_Surface();
|
||||
ddsd_src.dwFlags = DDSD_LPSURFACE | DDSD_PITCH;
|
||||
if (lpsurface) { // already locked, just get info ....
|
||||
if(res=lpddssrc->GetSurfaceDesc((LPDDSURFACEDESC)&ddsd_src)) {
|
||||
OutTraceE("BilBlt32_32: GetSurfaceDesc ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
(*pUnlockMethod(lpddsdst))(lpddsdst, lpdestrect);
|
||||
(*pUnlockMethod(lpddssrc))(lpddssrc, lpsrcrect);
|
||||
(*pUnlockMethod())(lpddsdst, lpdestrect);
|
||||
(*pUnlockMethod())(lpddssrc, lpsrcrect);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(res=(*pLock)(lpddssrc, 0, (LPDDSURFACEDESC)&ddsd_src, DDLOCK_SURFACEMEMORYPTR|DDLOCK_READONLY|DDLOCK_WAIT, 0)) {
|
||||
(*pUnlockMethod(lpddsdst))(lpddsdst,0);
|
||||
if(res=(*pLockMethod())(lpddssrc, 0, (LPDDSURFACEDESC)&ddsd_src, DDLOCK_SURFACEMEMORYPTR|DDLOCK_READONLY|DDLOCK_WAIT, 0)) {
|
||||
(*pUnlockMethod())(lpddsdst,0);
|
||||
OutTraceE("BilBlt32_32: Lock ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
@ -1347,14 +1347,14 @@ static HRESULT WINAPI BilinearBlt_32_to_32(LPDIRECTDRAWSURFACE lpddsdst, LPRECT
|
||||
|
||||
if(dxw.dwFlags3 & MARKBLIT) MarkRect32(dest0, 2*w, 2*h, destpitch);
|
||||
|
||||
res=(*pUnlockMethod(lpddsdst))(lpddsdst, lpdestrect);
|
||||
res=(*pUnlockMethod())(lpddsdst, lpdestrect);
|
||||
if (res) OutTraceE("BilBlt32_32: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddsdst, res, ExplainDDError(res), __LINE__);
|
||||
res=(*pUnlockMethod(lpddssrc))(lpddssrc, lpsrcrect);
|
||||
res=(*pUnlockMethod())(lpddssrc, lpsrcrect);
|
||||
if (res) OutTraceE("BilBlt32_32: Unlock ERROR dds=%x res=%x(%s) at %d\n", lpddssrc, res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI EmuBlt_Null(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdestrect,
|
||||
static HRESULT WINAPI EmuBlt_Null(int dxversion, Blt_Type pBlt, LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdestrect,
|
||||
LPDIRECTDRAWSURFACE lpddssrc, LPRECT lpsrcrect, DWORD dwflags, LPVOID lpsurface)
|
||||
{
|
||||
char *sMsg="EmuBlt: undefined color depth\n";
|
||||
@ -1367,7 +1367,7 @@ static HRESULT WINAPI EmuBlt_Null(LPDIRECTDRAWSURFACE lpddsdst, LPRECT lpdestrec
|
||||
// exported methods
|
||||
//--------------------------------------------------------------------------------------------//
|
||||
|
||||
void SetBltTransformations()
|
||||
void SetBltTransformations(int dxversion)
|
||||
{
|
||||
pPrimaryBlt = PrimaryBlt;
|
||||
if(dxw.dwFlags5 & AEROBOOST) pPrimaryBlt = PrimaryStretchBlt;
|
||||
@ -1376,9 +1376,9 @@ void SetBltTransformations()
|
||||
if(dxw.dwFlags5 & CENTERTOWIN) pPrimaryBlt = PrimaryFastBlt;
|
||||
if(dxw.dwFlags5 & NOBLT) pPrimaryBlt = PrimaryNoBlt; // debug opt
|
||||
|
||||
extern HRESULT WINAPI ColorConversionDDRAW(LPDIRECTDRAWSURFACE, RECT, LPDIRECTDRAWSURFACE *);
|
||||
extern HRESULT WINAPI ColorConversionGDI(LPDIRECTDRAWSURFACE, RECT, LPDIRECTDRAWSURFACE *);
|
||||
extern HRESULT WINAPI ColorConversionEmulated(LPDIRECTDRAWSURFACE, RECT, LPDIRECTDRAWSURFACE *);
|
||||
extern HRESULT WINAPI ColorConversionDDRAW(int, LPDIRECTDRAWSURFACE, RECT, LPDIRECTDRAWSURFACE *);
|
||||
extern HRESULT WINAPI ColorConversionGDI(int, LPDIRECTDRAWSURFACE, RECT, LPDIRECTDRAWSURFACE *);
|
||||
extern HRESULT WINAPI ColorConversionEmulated(int, LPDIRECTDRAWSURFACE, RECT, LPDIRECTDRAWSURFACE *);
|
||||
pColorConversion = ColorConversionDDRAW; // default for no emulation mode
|
||||
if(dxw.dwFlags1 & EMULATESURFACE) {
|
||||
pColorConversion = ColorConversionEmulated; // default for emulation mode
|
||||
|
@ -42,7 +42,7 @@ Preparedisasm_Type pPreparedisasm;
|
||||
Finishdisasm_Type pFinishdisasm;
|
||||
Disasm_Type pDisasm;
|
||||
|
||||
extern void InitScreenParameters();
|
||||
extern void InitScreenParameters(int);
|
||||
extern void *HotPatch(void *, const char *, void *);
|
||||
extern void *IATPatch(HMODULE, char *, void *, const char *, void *);
|
||||
extern void *IATPatchEx(HMODULE, DWORD, char *, void *, const char *, void *);
|
||||
@ -1382,7 +1382,7 @@ void HookInit(TARGETMAP *target, HWND hwnd)
|
||||
if(hMouseHook==NULL) OutTraceE("SetWindowsHookEx WH_GETMESSAGE failed: error=%d\n", GetLastError());
|
||||
}
|
||||
|
||||
InitScreenParameters();
|
||||
InitScreenParameters(0); // still unknown
|
||||
if(hwnd) HookWindowProc(hwnd);
|
||||
// in fullscreen mode, messages seem to reach and get processed by the parent window
|
||||
if((!dxw.Windowize) && hwnd) HookWindowProc(dxw.hParentWnd);
|
||||
|
@ -9,8 +9,8 @@
|
||||
#include "resource.h"
|
||||
#include "hddraw.h"
|
||||
#include "d3d9.h"
|
||||
extern GetDC_Type pGetDC;
|
||||
extern ReleaseDC_Type pReleaseDC;
|
||||
extern GetDC_Type pGetDCMethod();
|
||||
extern ReleaseDC_Type pReleaseDC1;
|
||||
extern HandleDDThreadLock_Type pReleaseDDThreadLock;
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
@ -963,7 +963,7 @@ void dxwCore::ScreenRefresh(void)
|
||||
#define DXWREFRESHINTERVAL 20
|
||||
|
||||
LPDIRECTDRAWSURFACE lpDDSPrim;
|
||||
extern HRESULT WINAPI extBlt(LPDIRECTDRAWSURFACE lpdds, LPRECT lpdestrect, LPDIRECTDRAWSURFACE lpddssrc, LPRECT lpsrcrect, DWORD dwflags, LPDDBLTFX lpddbltfx);
|
||||
extern HRESULT WINAPI extBlt(int, Blt_Type, LPDIRECTDRAWSURFACE, LPRECT, LPDIRECTDRAWSURFACE, LPRECT, DWORD, LPDDBLTFX);
|
||||
|
||||
static int t = -1;
|
||||
if (t == -1)
|
||||
@ -975,7 +975,9 @@ void dxwCore::ScreenRefresh(void)
|
||||
|
||||
// if not too early, refresh primary surface ....
|
||||
lpDDSPrim=dxwss.GetPrimarySurface();
|
||||
if (lpDDSPrim) extBlt(lpDDSPrim, NULL, lpDDSPrim, NULL, 0, NULL);
|
||||
extern Blt_Type pBltMethod();
|
||||
extern int lpddsHookedVersion();
|
||||
if (lpDDSPrim) extBlt(lpddsHookedVersion(), pBltMethod(), lpDDSPrim, NULL, lpDDSPrim, NULL, 0, NULL);
|
||||
|
||||
// v2.02.44 - used for what? Commenting out seems to fix the palette update glitches
|
||||
// and make the "Palette updates don't blit" option useless....
|
||||
@ -1309,13 +1311,13 @@ void dxwCore::ShowOverlay(LPDIRECTDRAWSURFACE lpdds)
|
||||
{
|
||||
typedef HRESULT (WINAPI *GetDC_Type) (LPDIRECTDRAWSURFACE, HDC FAR *);
|
||||
typedef HRESULT (WINAPI *ReleaseDC_Type)(LPDIRECTDRAWSURFACE, HDC);
|
||||
extern GetDC_Type pGetDC;
|
||||
extern ReleaseDC_Type pReleaseDC;
|
||||
extern GetDC_Type pGetDCMethod();
|
||||
extern ReleaseDC_Type pReleaseDCMethod();
|
||||
if (MustShowOverlay) {
|
||||
HDC hdc; // the working dc
|
||||
int h, w;
|
||||
if(!lpdds) return;
|
||||
if (FAILED((*pGetDC)(lpdds, &hdc))) return;
|
||||
if (FAILED((*pGetDCMethod())(lpdds, &hdc))) return;
|
||||
w = this->GetScreenWidth();
|
||||
h = this->GetScreenHeight();
|
||||
if(this->dwFlags4 & BILINEAR2XFILTER) {
|
||||
@ -1323,7 +1325,7 @@ void dxwCore::ShowOverlay(LPDIRECTDRAWSURFACE lpdds)
|
||||
h <<=1;
|
||||
}
|
||||
this->ShowOverlay(hdc, w, h);
|
||||
(*pReleaseDC)(lpdds, hdc);
|
||||
(*pReleaseDCMethod())(lpdds, hdc);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1674,6 +1676,7 @@ BOOL dxwCore::IsVirtual(HDC hdc)
|
||||
|
||||
HDC dxwCore::AcquireSharedDC(HWND hwnd)
|
||||
{
|
||||
#if 0
|
||||
extern HDC hFlippedDC;
|
||||
LPDIRECTDRAWSURFACE lpDDSPrim;
|
||||
lpDDSPrim = dxwss.GetPrimarySurface();
|
||||
@ -1704,6 +1707,8 @@ HDC dxwCore::AcquireSharedDC(HWND hwnd)
|
||||
|
||||
OutTraceDW("AcquireSharedDC: remapping flipped GDI lpDDSPrim=%x hdc=%x\n", lpDDSPrim, hFlippedDC);
|
||||
return hFlippedDC;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL dxwCore::ReleaseSharedDC(HWND hwnd, HDC hDC)
|
||||
@ -1713,7 +1718,7 @@ BOOL dxwCore::ReleaseSharedDC(HWND hwnd, HDC hDC)
|
||||
lpDDSPrim = dxwss.GetPrimarySurface();
|
||||
if(!lpDDSPrim) return(TRUE);
|
||||
OutTraceDW("GDI.ReleaseDC: releasing flipped GDI hdc=%x\n", hDC);
|
||||
ret=(*pReleaseDC)(dxwss.GetPrimarySurface(), hDC);
|
||||
ret=(*pReleaseDC1)(dxwss.GetPrimarySurface(), hDC);
|
||||
if (!(hwnd == dxw.GethWnd())) {
|
||||
POINT father, child, offset;
|
||||
RECT rect;
|
||||
|
@ -366,6 +366,6 @@ typedef enum {
|
||||
GDIMODE_SHAREDDC
|
||||
};
|
||||
|
||||
typedef HRESULT (WINAPI *ColorConversion_Type)(LPDIRECTDRAWSURFACE, RECT, LPDIRECTDRAWSURFACE *);
|
||||
typedef HRESULT (WINAPI *ColorConversion_Type)(int, LPDIRECTDRAWSURFACE, RECT, LPDIRECTDRAWSURFACE *);
|
||||
extern ColorConversion_Type pColorConversion;
|
||||
extern void ToggleAcquiredDevices(BOOL);
|
||||
|
@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "TlHelp32.h"
|
||||
|
||||
#define VERSION "2.03.59"
|
||||
#define VERSION "2.03.60"
|
||||
|
||||
#define DDTHREADLOCK 1
|
||||
//#define LOCKTHREADS
|
||||
|
Binary file not shown.
@ -31,7 +31,7 @@
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="embed manifest"
|
||||
CommandLine="mt.exe -nologo -manifest dxwnd.dll.manifest -outputresource:"../Debug/dxwnd.dll;#1"
|
||||
CommandLine="mt.exe -nologo -manifest dxwnd.dll.manifest -outputresource:"../Debug/dxwnd.dll;#1
"
|
||||
Outputs="manifest.out.txt"
|
||||
/>
|
||||
<Tool
|
||||
@ -135,7 +135,7 @@
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="embed manifest"
|
||||
CommandLine="mt.exe -nologo -manifest dxwnd.dll.manifest -outputresource:"../Release/dxwnd.dll;#1"
|
||||
CommandLine="mt.exe -nologo -manifest dxwnd.dll.manifest -outputresource:"../Release/dxwnd.dll;#1
"
|
||||
Outputs="manifest.out.txt"
|
||||
/>
|
||||
<Tool
|
||||
@ -449,6 +449,10 @@
|
||||
RelativePath=".\kernel32.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\mincaps.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\msghook.cpp"
|
||||
>
|
||||
|
@ -332,11 +332,11 @@ FARPROC Remap_GDI32_ProcAddress(LPCSTR proc, HMODULE hModule)
|
||||
//--------------------------------------------------------------------------------------------
|
||||
|
||||
extern DWORD PaletteEntries[256];
|
||||
extern Unlock4_Type pUnlockMethod(LPDIRECTDRAWSURFACE);
|
||||
extern HRESULT WINAPI sBlt(char *, LPDIRECTDRAWSURFACE, LPRECT, LPDIRECTDRAWSURFACE, LPRECT, DWORD, LPDDBLTFX, BOOL);
|
||||
extern Unlock4_Type pUnlockMethod();
|
||||
extern HRESULT WINAPI sBlt(int, Blt_Type, char *, LPDIRECTDRAWSURFACE, LPRECT, LPDIRECTDRAWSURFACE, LPRECT, DWORD, LPDDBLTFX, BOOL);
|
||||
|
||||
extern GetDC_Type pGetDC;
|
||||
extern ReleaseDC_Type pReleaseDC;
|
||||
extern ReleaseDC_Type pReleaseDC1;
|
||||
|
||||
//--------------------------------------------------------------------------------------------
|
||||
//
|
||||
@ -688,11 +688,13 @@ HPALETTE WINAPI extSelectPalette(HDC hdc, HPALETTE hpal, BOOL bForceBackground)
|
||||
ret=(*pGDISelectPalette)(hdc, hpal, bForceBackground);
|
||||
}
|
||||
else{
|
||||
extern GetDC_Type pGetDCMethod();
|
||||
extern ReleaseDC_Type pReleaseDCMethod();
|
||||
LPDIRECTDRAWSURFACE lpDDSPrim;
|
||||
lpDDSPrim = dxwss.GetPrimarySurface();
|
||||
(*pGetDC)(lpDDSPrim, &hdc);
|
||||
(*pGetDCMethod())(lpDDSPrim, &hdc);
|
||||
ret=(*pGDISelectPalette)(hdc, hpal, bForceBackground);
|
||||
(*pReleaseDC)(lpDDSPrim, hdc);
|
||||
(*pReleaseDCMethod())(lpDDSPrim, hdc);
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
@ -13,9 +13,9 @@
|
||||
#include "dxhelper.h"
|
||||
#include "syslibs.h"
|
||||
|
||||
extern GetDC_Type pGetDC;
|
||||
extern ReleaseDC_Type pReleaseDC;
|
||||
extern Unlock1_Type pUnlock1;
|
||||
extern GetDC_Type pGetDCMethod();
|
||||
extern ReleaseDC_Type pReleaseDCMethod();
|
||||
extern Unlock1_Type pUnlockMethod();
|
||||
|
||||
void BlitToWindow(HWND w, LPDIRECTDRAWSURFACE s)
|
||||
{
|
||||
@ -25,7 +25,7 @@ void BlitToWindow(HWND w, LPDIRECTDRAWSURFACE s)
|
||||
BOOL ret;
|
||||
|
||||
if(!s) return; // for surface color fill
|
||||
res=(*pGetDC)(s, &shdc);
|
||||
res=(*pGetDCMethod())(s, &shdc);
|
||||
if(res) {
|
||||
OutTrace("ddraw GetDC error lpdds=%x res=%x(%s)\n", s, res, ExplainDDError(res));
|
||||
return;
|
||||
@ -54,9 +54,8 @@ void BlitToWindow(HWND w, LPDIRECTDRAWSURFACE s)
|
||||
if(!ret) OutTrace("GDI StretchBlt error=%d\n", GetLastError());
|
||||
}
|
||||
dxw.ShowOverlay(thdc);
|
||||
res=(*pReleaseDC)(s, shdc);
|
||||
res=(*pReleaseDCMethod())(s, shdc);
|
||||
if(res) OutTrace("ddraw ReleaseDC error lpdds=%x res=%x(%s)\n", s, res, ExplainDDError(res));
|
||||
ret=(*pGDIReleaseDC)(w, thdc);
|
||||
if(!ret) OutTrace("GDI ReleaseDC error=%d\n", GetLastError());
|
||||
}
|
||||
|
||||
}
|
@ -437,6 +437,7 @@ void HookDirect3DSession(LPDIRECTDRAW *lplpdd, int d3dversion)
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 0), extQueryInterfaceD3, (void **)&pQueryInterfaceD3, "QueryInterface(D3S)");
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 12), extEnumDevices7, (void **)&pEnumDevices7, "EnumDevices(7)");
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 16), extCreateDevice7, (void **)&pCreateDevice7, "CreateDevice(D3D7)");
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 24), extEnumZBufferFormats, (void **)&pEnumZBufferFormats, "EnumZBufferFormats(D3D3)");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
34
dll/hddraw.h
34
dll/hddraw.h
@ -2,27 +2,16 @@
|
||||
|
||||
typedef HRESULT (WINAPI *DirectDrawCreate_Type)(GUID *, LPDIRECTDRAW *, IUnknown *);
|
||||
typedef HRESULT (WINAPI *DirectDrawCreateEx_Type)(GUID *, LPDIRECTDRAW *, REFIID, IUnknown *);
|
||||
typedef HRESULT (WINAPI *DirectDrawEnumerate_Type)(LPDDENUMCALLBACK, LPVOID);
|
||||
typedef HRESULT (WINAPI *DirectDrawEnumerateEx_Type)(LPDDENUMCALLBACKEX, LPVOID, DWORD);
|
||||
typedef HRESULT (WINAPI *DirectDrawEnumerateA_Type)(LPDDENUMCALLBACKA, LPVOID);
|
||||
typedef HRESULT (WINAPI *DirectDrawEnumerateExA_Type)(LPDDENUMCALLBACKEXA, LPVOID, DWORD);
|
||||
typedef HRESULT (WINAPI *DirectDrawEnumerateW_Type)(LPDDENUMCALLBACKW, LPVOID);
|
||||
typedef HRESULT (WINAPI *DirectDrawEnumerateExW_Type)(LPDDENUMCALLBACKEXW, LPVOID, DWORD);
|
||||
typedef HRESULT (WINAPI *DirectDrawCreateClipper_Type)(DWORD, LPDIRECTDRAWCLIPPER *, IUnknown *);
|
||||
typedef void (WINAPI *HandleDDThreadLock_Type)(void);
|
||||
|
||||
typedef HDC (WINAPI *GDIGetDC_Type)(HWND);
|
||||
typedef int (WINAPI *GDIReleaseDC_Type)(HWND, HDC);
|
||||
|
||||
typedef HRESULT (WINAPI *EmuBlt_Type)(LPDIRECTDRAWSURFACE, LPRECT, LPDIRECTDRAWSURFACE, LPRECT, DWORD, LPVOID);
|
||||
typedef HRESULT (WINAPI *RevBlt_Type)(LPDIRECTDRAWSURFACE, LPRECT, LPDIRECTDRAWSURFACE, LPRECT);
|
||||
typedef HRESULT (WINAPI *PrimaryBlt_Type)(LPDIRECTDRAWSURFACE, LPRECT, LPDIRECTDRAWSURFACE, LPRECT);
|
||||
|
||||
extern EmuBlt_Type pEmuBlt;
|
||||
extern RevBlt_Type pRevBlt;
|
||||
extern void SetBltTransformations();
|
||||
extern HRESULT WINAPI PrimaryBlt(LPDIRECTDRAWSURFACE, LPRECT, LPDIRECTDRAWSURFACE, LPRECT);
|
||||
extern HRESULT WINAPI PrimaryNoBlt(LPDIRECTDRAWSURFACE, LPRECT, LPDIRECTDRAWSURFACE, LPRECT);
|
||||
extern HRESULT WINAPI PrimaryStretchBlt(LPDIRECTDRAWSURFACE, LPRECT, LPDIRECTDRAWSURFACE, LPRECT);
|
||||
extern HRESULT WINAPI PrimaryFastBlt(LPDIRECTDRAWSURFACE, LPRECT, LPDIRECTDRAWSURFACE, LPRECT);
|
||||
extern HRESULT WINAPI PrimaryBilinearBlt(LPDIRECTDRAWSURFACE, LPRECT, LPDIRECTDRAWSURFACE, LPRECT);
|
||||
|
||||
// COM generic types
|
||||
typedef HRESULT (WINAPI *QueryInterface_Type)(void *, REFIID, LPVOID *);
|
||||
|
||||
@ -37,7 +26,6 @@ typedef HRESULT (WINAPI *CreatePalette_Type)(LPDIRECTDRAW, DWORD, LPPALETTEENTRY
|
||||
typedef HRESULT (WINAPI *CreateSurface1_Type)(LPDIRECTDRAW, DDSURFACEDESC *, LPDIRECTDRAWSURFACE *, void *);
|
||||
typedef HRESULT (WINAPI *CreateSurface2_Type)(LPDIRECTDRAW, DDSURFACEDESC2 *, LPDIRECTDRAWSURFACE *, void *);
|
||||
typedef HRESULT (WINAPI *CreateSurface_Type)(LPDIRECTDRAW, DDSURFACEDESC2 *, LPDIRECTDRAWSURFACE *, void *);
|
||||
typedef HRESULT (WINAPI *DuplicateSurface_Type)(LPDIRECTDRAW, LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE *);
|
||||
typedef HRESULT (WINAPI *EnumDisplayModes1_Type)(LPDIRECTDRAW, DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK);
|
||||
typedef HRESULT (WINAPI *EnumDisplayModes4_Type)(LPDIRECTDRAW, DWORD, LPDDSURFACEDESC2, LPVOID, LPDDENUMMODESCALLBACK2);
|
||||
typedef HRESULT (WINAPI *EnumSurfaces1_Type)(LPDIRECTDRAW, DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMSURFACESCALLBACK);
|
||||
@ -133,6 +121,18 @@ typedef HRESULT (WINAPI *GammaRamp_Type)(LPDIRECTDRAWSURFACE, DWORD, LPDDGAMMARA
|
||||
// extern procedures
|
||||
|
||||
extern void HookTexture(LPVOID *, int);
|
||||
extern int Set_dwSize_From_Surface(LPDIRECTDRAWSURFACE);
|
||||
extern int Set_dwSize_From_Surface();
|
||||
|
||||
extern void SetBltTransformations(int);
|
||||
extern HRESULT WINAPI PrimaryBlt(int, Blt_Type, LPDIRECTDRAWSURFACE, LPRECT, LPDIRECTDRAWSURFACE, LPRECT);
|
||||
extern HRESULT WINAPI PrimaryNoBlt(int, Blt_Type, LPDIRECTDRAWSURFACE, LPRECT, LPDIRECTDRAWSURFACE, LPRECT);
|
||||
extern HRESULT WINAPI PrimaryStretchBlt(int, Blt_Type, LPDIRECTDRAWSURFACE, LPRECT, LPDIRECTDRAWSURFACE, LPRECT);
|
||||
extern HRESULT WINAPI PrimaryFastBlt(int, Blt_Type, LPDIRECTDRAWSURFACE, LPRECT, LPDIRECTDRAWSURFACE, LPRECT);
|
||||
extern HRESULT WINAPI PrimaryBilinearBlt(int, Blt_Type, LPDIRECTDRAWSURFACE, LPRECT, LPDIRECTDRAWSURFACE, LPRECT);
|
||||
|
||||
typedef HRESULT (WINAPI *EmuBlt_Type)(int, Blt_Type, LPDIRECTDRAWSURFACE, LPRECT, LPDIRECTDRAWSURFACE, LPRECT, DWORD, LPVOID);
|
||||
typedef HRESULT (WINAPI *RevBlt_Type)(int, Blt_Type, LPDIRECTDRAWSURFACE, LPRECT, LPDIRECTDRAWSURFACE, LPRECT);
|
||||
typedef HRESULT (WINAPI *PrimaryBlt_Type)(int, Blt_Type, LPDIRECTDRAWSURFACE, LPRECT, LPDIRECTDRAWSURFACE, LPRECT);
|
||||
|
||||
extern EmuBlt_Type pEmuBlt;
|
||||
extern RevBlt_Type pRevBlt;
|
||||
|
@ -15,8 +15,8 @@ BOOL WINAPI extCheckRemoteDebuggerPresent(HANDLE, PBOOL);
|
||||
LPVOID WINAPI extVirtualAlloc(LPVOID, SIZE_T, DWORD, DWORD);
|
||||
UINT WINAPI extWinExec(LPCSTR, UINT);
|
||||
|
||||
extern HRESULT WINAPI extDirectDrawEnumerate(LPDDENUMCALLBACK, LPVOID);
|
||||
extern HRESULT WINAPI extDirectDrawEnumerateEx(LPDDENUMCALLBACKEX, LPVOID, DWORD);
|
||||
extern HRESULT WINAPI extDirectDrawEnumerateA(LPDDENUMCALLBACK, LPVOID);
|
||||
extern HRESULT WINAPI extDirectDrawEnumerateExA(LPDDENUMCALLBACKEX, LPVOID, DWORD);
|
||||
|
||||
typedef LPVOID (WINAPI *VirtualAlloc_Type)(LPVOID, SIZE_T, DWORD, DWORD);
|
||||
typedef BOOL (WINAPI *CreateProcessA_Type)(LPCTSTR, LPTSTR, LPSECURITY_ATTRIBUTES, LPSECURITY_ATTRIBUTES,
|
||||
@ -151,8 +151,8 @@ FARPROC Remap_kernel32_ProcAddress(LPCSTR proc, HMODULE hModule)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
extern DirectDrawEnumerate_Type pDirectDrawEnumerate;
|
||||
extern DirectDrawEnumerateEx_Type pDirectDrawEnumerateEx;
|
||||
extern DirectDrawEnumerateA_Type pDirectDrawEnumerateA;
|
||||
extern DirectDrawEnumerateExA_Type pDirectDrawEnumerateExA;
|
||||
extern void HookModule(HMODULE, int);
|
||||
|
||||
int WINAPI extIsDebuggerPresent(void)
|
||||
@ -666,26 +666,26 @@ FARPROC WINAPI extGetProcAddress(HMODULE hModule, LPCSTR proc)
|
||||
switch(idx){
|
||||
case SYSLIBIDX_DIRECTDRAW:
|
||||
switch((DWORD)proc){
|
||||
case 0x0008: // DirectDrawCreate
|
||||
pDirectDrawCreate=(DirectDrawCreate_Type)(*pGetProcAddress)(hModule, proc);
|
||||
OutTraceDW("GetProcAddress: hooking proc=%s at addr=%x\n", ProcToString(proc), pDirectDrawCreate);
|
||||
return (FARPROC)extDirectDrawCreate;
|
||||
break;
|
||||
case 0x000A: // DirectDrawCreateEx
|
||||
pDirectDrawCreateEx=(DirectDrawCreateEx_Type)(*pGetProcAddress)(hModule, proc);
|
||||
OutTraceDW("GetProcAddress: hooking proc=%s at addr=%x\n", ProcToString(proc), pDirectDrawCreateEx);
|
||||
return (FARPROC)extDirectDrawCreateEx;
|
||||
break;
|
||||
case 0x000B: // DirectDrawEnumerateA
|
||||
pDirectDrawEnumerate=(DirectDrawEnumerate_Type)(*pGetProcAddress)(hModule, proc);
|
||||
OutTraceP("GetProcAddress: hooking proc=%s at addr=%x\n", proc, pDirectDrawEnumerate);
|
||||
return (FARPROC)extDirectDrawEnumerate;
|
||||
break;
|
||||
case 0x000C: // DirectDrawEnumerateExA
|
||||
pDirectDrawEnumerateEx=(DirectDrawEnumerateEx_Type)(*pGetProcAddress)(hModule, proc);
|
||||
OutTraceP("GetProcAddress: hooking proc=%s at addr=%x\n", proc, pDirectDrawEnumerateEx);
|
||||
return (FARPROC)extDirectDrawEnumerateEx;
|
||||
break;
|
||||
case 0x0008: // DirectDrawCreate
|
||||
pDirectDrawCreate=(DirectDrawCreate_Type)(*pGetProcAddress)(hModule, proc);
|
||||
OutTraceDW("GetProcAddress: hooking proc=%s at addr=%x\n", ProcToString(proc), pDirectDrawCreate);
|
||||
return (FARPROC)extDirectDrawCreate;
|
||||
break;
|
||||
case 0x000A: // DirectDrawCreateEx
|
||||
pDirectDrawCreateEx=(DirectDrawCreateEx_Type)(*pGetProcAddress)(hModule, proc);
|
||||
OutTraceDW("GetProcAddress: hooking proc=%s at addr=%x\n", ProcToString(proc), pDirectDrawCreateEx);
|
||||
return (FARPROC)extDirectDrawCreateEx;
|
||||
break;
|
||||
case 0x000B: // DirectDrawEnumerateA
|
||||
pDirectDrawEnumerateA=(DirectDrawEnumerateA_Type)(*pGetProcAddress)(hModule, proc);
|
||||
OutTraceP("GetProcAddress: hooking proc=%s at addr=%x\n", proc, pDirectDrawEnumerateA);
|
||||
return (FARPROC)extDirectDrawEnumerateA;
|
||||
break;
|
||||
case 0x000C: // DirectDrawEnumerateExA
|
||||
pDirectDrawEnumerateExA=(DirectDrawEnumerateExA_Type)(*pGetProcAddress)(hModule, proc);
|
||||
OutTraceP("GetProcAddress: hooking proc=%s at addr=%x\n", proc, pDirectDrawEnumerateExA);
|
||||
return (FARPROC)extDirectDrawEnumerateExA;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case SYSLIBIDX_USER32:
|
||||
|
270
dll/mincaps.cpp
Normal file
270
dll/mincaps.cpp
Normal file
@ -0,0 +1,270 @@
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#define INITGUID
|
||||
|
||||
#include <windows.h>
|
||||
#include <ddraw.h>
|
||||
#include "dxwnd.h"
|
||||
#include "dxhook.h"
|
||||
#include "ddrawi.h"
|
||||
#include "dxwcore.hpp"
|
||||
#include "stdio.h"
|
||||
#include "hddraw.h"
|
||||
#include "dxhelper.h"
|
||||
#include "syslibs.h"
|
||||
|
||||
#define VIRTUAL_CAPS_VIRTUALPC TRUE
|
||||
|
||||
#if 0
|
||||
typedef struct _DDCAPS_DX7
|
||||
{
|
||||
/* 0*/ DWORD dwSize; // size of the DDDRIVERCAPS structure
|
||||
/* 4*/ DWORD dwCaps; // driver specific capabilities
|
||||
/* 8*/ DWORD dwCaps2; // more driver specific capabilites
|
||||
/* c*/ DWORD dwCKeyCaps; // color key capabilities of the surface
|
||||
/* 10*/ DWORD dwFXCaps; // driver specific stretching and effects capabilites
|
||||
/* 14*/ DWORD dwFXAlphaCaps; // alpha driver specific capabilities
|
||||
/* 18*/ DWORD dwPalCaps; // palette capabilities
|
||||
/* 1c*/ DWORD dwSVCaps; // stereo vision capabilities
|
||||
/* 20*/ DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8
|
||||
/* 24*/ DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8
|
||||
/* 28*/ DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8
|
||||
/* 2c*/ DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8
|
||||
/* 30*/ DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8
|
||||
/* 34*/ DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
|
||||
/* 38*/ DWORD dwZBufferBitDepths; // DDBD_8,16,24,32
|
||||
/* 3c*/ DWORD dwVidMemTotal; // total amount of video memory
|
||||
/* 40*/ DWORD dwVidMemFree; // amount of free video memory
|
||||
/* 44*/ DWORD dwMaxVisibleOverlays; // maximum number of visible overlays
|
||||
/* 48*/ DWORD dwCurrVisibleOverlays; // current number of visible overlays
|
||||
/* 4c*/ DWORD dwNumFourCCCodes; // number of four cc codes
|
||||
/* 50*/ DWORD dwAlignBoundarySrc; // source rectangle alignment
|
||||
/* 54*/ DWORD dwAlignSizeSrc; // source rectangle byte size
|
||||
/* 58*/ DWORD dwAlignBoundaryDest; // dest rectangle alignment
|
||||
/* 5c*/ DWORD dwAlignSizeDest; // dest rectangle byte size
|
||||
/* 60*/ DWORD dwAlignStrideAlign; // stride alignment
|
||||
/* 64*/ DWORD dwRops[DD_ROP_SPACE]; // ROPS supported
|
||||
/* 84*/ DDSCAPS ddsOldCaps; // Was DDSCAPS ddsCaps. ddsCaps is of type DDSCAPS2 for DX6
|
||||
/* 88*/ DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
|
||||
/* 8c*/ DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
|
||||
/* 90*/ DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
|
||||
/* 94*/ DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
|
||||
/* 98*/ DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
|
||||
/* 9c*/ DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
|
||||
/* a0*/ DWORD dwReserved1; // reserved
|
||||
/* a4*/ DWORD dwReserved2; // reserved
|
||||
/* a8*/ DWORD dwReserved3; // reserved
|
||||
/* ac*/ DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts
|
||||
/* b0*/ DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts
|
||||
/* b4*/ DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts
|
||||
/* b8*/ DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
|
||||
/* d8*/ DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts
|
||||
/* dc*/ DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts
|
||||
/* e0*/ DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts
|
||||
/* e4*/ DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
|
||||
/*104*/ DWORD dwSSBCaps; // driver specific capabilities for System->System blts
|
||||
/*108*/ DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts
|
||||
/*10c*/ DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts
|
||||
/*110*/ DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
|
||||
/*130*/ DWORD dwMaxVideoPorts; // maximum number of usable video ports
|
||||
/*134*/ DWORD dwCurrVideoPorts; // current number of video ports used
|
||||
/*138*/ DWORD dwSVBCaps2; // more driver specific capabilities for System->Vmem blts
|
||||
/*13c*/ DWORD dwNLVBCaps; // driver specific capabilities for non-local->local vidmem blts
|
||||
/*140*/ DWORD dwNLVBCaps2; // more driver specific capabilities non-local->local vidmem blts
|
||||
/*144*/ DWORD dwNLVBCKeyCaps; // driver color key capabilities for non-local->local vidmem blts
|
||||
/*148*/ DWORD dwNLVBFXCaps; // driver FX capabilities for non-local->local blts
|
||||
/*14c*/ DWORD dwNLVBRops[DD_ROP_SPACE]; // ROPS supported for non-local->local blts
|
||||
// Members added for DX6 release
|
||||
/*16c*/ DDSCAPS2 ddsCaps; // Surface Caps
|
||||
} DDCAPS_DX7;
|
||||
typedef DDCAPS_DX7 FAR* LPDDCAPS_DX7;
|
||||
#endif
|
||||
|
||||
void SetMinimalCaps(LPDDCAPS c1, LPDDCAPS c2)
|
||||
{
|
||||
#ifdef VIRTUAL_CAPS_VMWARE
|
||||
if(c1){
|
||||
int dwSize = c1->dwSize;
|
||||
//memset(&c1, 0, dwSize);
|
||||
c1->dwSize = dwSize;
|
||||
c1->dwCaps = (DDCAPS_3D|DDCAPS_BLT|DDCAPS_BLTQUEUE|DDCAPS_OVERLAY|DDCAPS_OVERLAYFOURCC|DDCAPS_OVERLAYSTRETCH|DDCAPS_COLORKEY|DDCAPS_BLTDEPTHFILL|DDCAPS_CANBLTSYSMEM);
|
||||
c1->dwCaps2 = (DDCAPS2_WIDESURFACES|DDCAPS2_CANRENDERWINDOWED|DDCAPS2_FLIPNOVSYNC);
|
||||
c1->dwCKeyCaps = (DDCKEYCAPS_DESTOVERLAY);
|
||||
c1->dwFXCaps = (DDFXCAPS_OVERLAYSHRINKX|DDFXCAPS_OVERLAYSHRINKY|DDFXCAPS_OVERLAYSTRETCHX|DDFXCAPS_OVERLAYSTRETCHY);
|
||||
c1->dwZBufferBitDepths = 0x600;
|
||||
c1->dwMaxVisibleOverlays = 0x20;
|
||||
for(int j=0; j<DD_ROP_SPACE; j++) c1->dwRops[j]=0;
|
||||
c1->dwRops[6] = 0x100;
|
||||
if(dwSize >= (int)(0x16C)) {
|
||||
c1->ddsCaps.dwCaps = 0x42727A;
|
||||
c1->ddsCaps.dwCaps2 = 0x200200;
|
||||
}
|
||||
// c1->dwNumFourCCCodes - untouched (03 in VmWare)
|
||||
}
|
||||
if(c2){
|
||||
int dwSize = c2->dwSize;
|
||||
//memset(&c2, 0, dwSize);
|
||||
c2->dwSize = dwSize;
|
||||
c2->dwCaps = (DDCAPS_3D|DDCAPS_BLT|DDCAPS_BLTSTRETCH|DDCAPS_PALETTE|DDCAPS_COLORKEY|DDCAPS_ALPHA|DDCAPS_BLTCOLORFILL|DDCAPS_BLTDEPTHFILL|DDCAPS_CANCLIP|DDCAPS_CANCLIPSTRETCHED|DDCAPS_CANBLTSYSMEM);
|
||||
c2->dwCaps2 = (DDCAPS2_CERTIFIED);
|
||||
c2->dwCKeyCaps =(DDCKEYCAPS_SRCBLT);
|
||||
c2->dwPalCaps = 0x347; // ???
|
||||
c2->dwFXCaps = (DDFXCAPS_BLTARITHSTRETCHY|DDFXCAPS_BLTMIRRORLEFTRIGHT|DDFXCAPS_BLTMIRRORUPDOWN|DDFXCAPS_BLTSHRINKX|DDFXCAPS_BLTSHRINKXN|DDFXCAPS_BLTSHRINKY|DDFXCAPS_BLTSHRINKYN|DDFXCAPS_BLTSTRETCHX|DDFXCAPS_BLTSTRETCHXN|DDFXCAPS_BLTSTRETCHY|DDFXCAPS_BLTSTRETCHYN|DDFXCAPS_BLTALPHA|DDFXCAPS_BLTFILTER|DDFXCAPS_BLTARITHSTRETCHY);
|
||||
for(int j=0; j<DD_ROP_SPACE; j++) c2->dwRops[j]=0;
|
||||
c2->dwRops[0] = 0x1;
|
||||
c2->dwRops[6] = 0x100;
|
||||
c2->dwRops[7] = 0x8000000;
|
||||
c2->ddsOldCaps.dwCaps = 0x421350;
|
||||
// VMWare specific?
|
||||
c2->dwSVBCaps = 0xF4C08241;
|
||||
c2->dwSVBCKeyCaps = 0x200;
|
||||
c2->dwSVBFXCaps = 0x3FCE3 ;
|
||||
for(int j=0; j<DD_ROP_SPACE; j++) c2->dwSVBRops[j]=0;
|
||||
c2->dwSVBRops[0] = 0x1;
|
||||
c2->dwSVBRops[6] = 0x100;
|
||||
c2->dwSVBRops[7] = 0x8000000;
|
||||
c2->dwVSBCaps = 0xF4C08241;
|
||||
c2->dwVSBCKeyCaps = 0x200;
|
||||
c2->dwVSBFXCaps = 0x3FCE3;
|
||||
for(int j=0; j<DD_ROP_SPACE; j++) c2->dwVSBRops[j]=0;
|
||||
c2->dwVSBRops[0] = 0x1;
|
||||
c2->dwVSBRops[6] = 0x100;
|
||||
c2->dwVSBRops[7] = 0x8000000;
|
||||
c2->dwSSBCaps = 0xF4C08241;
|
||||
c2->dwSSBFXCaps = 0x3FCE3;
|
||||
for(int j=0; j<DD_ROP_SPACE; j++) c2->dwSSBRops[j]=0;
|
||||
c2->dwSSBRops[0] = 1;
|
||||
c2->dwSSBRops[6] = 0x100;
|
||||
c2->dwSSBRops[7] = 0x8000000;
|
||||
if(dwSize > (int)0x16C) {
|
||||
c2->ddsCaps.dwCaps = 0x421350;
|
||||
c2->ddsCaps.dwCaps2 = 0x200;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef VIRTUAL_CAPS_VIRTUALPC
|
||||
/*
|
||||
CapsDump(c1:HW)=
|
||||
------- 00 -------- 04 -------- 08 -------- 0c --------
|
||||
0x0000: 7C,01,00,00,C1,68,40,90,00,10,48,00,10,00,00,00,
|
||||
0x0010: 00,00,A8,02,00,00,00,00,00,00,00,00,00,00,00,00,
|
||||
0x0020: 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,
|
||||
0x0030: 00,00,00,00,00,00,00,00,00,06,00,00,C0,21,55,00,
|
||||
0x0040: C0,21,55,00,20,00,00,00,00,00,00,00,00,00,00,00,
|
||||
0x0050: 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,
|
||||
0x0060: 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,
|
||||
0x0070: 00,00,00,00,00,00,00,00,00,00,00,00,00,01,00,00,
|
||||
0x0080: 00,00,00,00,50,02,00,00,00,00,00,00,00,00,00,00,
|
||||
0x0090: 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,
|
||||
0x00a0: 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,
|
||||
0x00b0: 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,
|
||||
0x00c0: 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,
|
||||
0x00d0: 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,
|
||||
0x00e0: 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,
|
||||
0x00f0: 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,
|
||||
0x0100: 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,
|
||||
0x0110: 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,
|
||||
0x0120: 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,
|
||||
0x0130: 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,
|
||||
0x0140: 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,
|
||||
0x0150: 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,
|
||||
0x0160: 00,00,00,00,00,00,00,00,00,00,00,00,7A,72,42,00,
|
||||
0x0170: 00,02,20,00,00,00,00,00,00,00,00,00,
|
||||
CapsDump(c2:SW)=
|
||||
------- 00 -------- 04 -------- 08 -------- 0c --------
|
||||
0x0000: 7C,01,00,00,41,82,C0,F4,01,00,00,00,00,02,00,00,
|
||||
0x0010: E1,FC,03,00,00,00,00,00,47,03,00,00,00,00,00,00,
|
||||
0x0020: 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,
|
||||
0x0030: 00,00,00,00,00,00,00,00,00,04,00,00,00,00,00,00,
|
||||
0x0040: 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,
|
||||
0x0050: 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,
|
||||
0x0060: 00,00,00,00,01,00,00,00,00,00,00,00,00,00,00,00,
|
||||
0x0070: 00,00,00,00,00,00,00,00,00,00,00,00,00,01,00,00,
|
||||
0x0080: 00,00,00,08,50,13,42,00,00,00,00,00,00,00,00,00,
|
||||
0x0090: 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,
|
||||
0x00a0: 00,00,00,00,00,00,00,00,00,00,00,00,41,82,C0,F4,
|
||||
0x00b0: 00,02,00,00,E3,FC,03,00,01,00,00,00,00,00,00,00,
|
||||
0x00c0: 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,
|
||||
0x00d0: 00,01,00,00,00,00,00,08,41,82,C0,F4,00,02,00,00,
|
||||
0x00e0: E3,FC,03,00,01,00,00,00,00,00,00,00,00,00,00,00,
|
||||
0x00f0: 00,00,00,00,00,00,00,00,00,00,00,00,00,01,00,00,
|
||||
0x0100: 00,00,00,08,41,82,C0,F4,00,02,00,00,E3,FC,03,00,
|
||||
0x0110: 01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,
|
||||
0x0120: 00,00,00,00,00,00,00,00,00,01,00,00,00,00,00,08,
|
||||
0x0130: 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,
|
||||
0x0140: 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,
|
||||
0x0150: 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,
|
||||
0x0160: 00,00,00,00,00,00,00,00,00,00,00,00,50,13,42,00,
|
||||
0x0170: 00,02,00,00,00,00,00,00,00,00,00,00,
|
||||
*/
|
||||
if(c1){
|
||||
DWORD dwSize = c1->dwSize;
|
||||
DWORD dwVidMemTotal = c1->dwVidMemTotal;
|
||||
DWORD dwVidMemFree = c1->dwVidMemFree;
|
||||
memset((void *)c1, 0, dwSize);
|
||||
c1->dwSize = dwSize;
|
||||
c1->dwCaps = 0x904068c1;
|
||||
c1->dwCaps2 = 0x481000;
|
||||
c1->dwCKeyCaps = 0x1;
|
||||
c1->dwFXCaps = 0x2a80000;
|
||||
c1->dwZBufferBitDepths = 0x600;
|
||||
c1->dwVidMemTotal = dwVidMemTotal;
|
||||
c1->dwVidMemFree = dwVidMemFree;
|
||||
c1->dwMaxVisibleOverlays = 0x20;
|
||||
//for(int j=0; j<DD_ROP_SPACE; j++) c1->dwRops[j]=0;
|
||||
c1->dwRops[6] = 0x100;
|
||||
c1->ddsOldCaps.dwCaps = 0x250;
|
||||
if(dwSize >= (int)(0x16C)) {
|
||||
c1->ddsCaps.dwCaps = 0x42727A;
|
||||
c1->ddsCaps.dwCaps2 = 0x200200;
|
||||
}
|
||||
}
|
||||
if(c2){
|
||||
int dwSize = c2->dwSize;
|
||||
DWORD dwVidMemTotal = c2->dwVidMemTotal;
|
||||
DWORD dwVidMemFree = c2->dwVidMemFree;
|
||||
memset((void *)c2, 0, dwSize);
|
||||
c2->dwSize = dwSize;
|
||||
c2->dwCaps = 0xf4c08241;
|
||||
c2->dwCaps2 = 0x1;
|
||||
c2->dwCKeyCaps = 0x200;
|
||||
c2->dwFXCaps = 0x3fce1;
|
||||
c2->dwPalCaps = 0x347;
|
||||
c2->dwVidMemTotal = dwVidMemTotal;
|
||||
c2->dwVidMemFree = dwVidMemFree;
|
||||
if(dwSize > (int)0xac){
|
||||
//for(int j=0; j<DD_ROP_SPACE; j++) c2->dwRops[j]=0;
|
||||
c2->dwRops[0] = 0x1;
|
||||
c1->dwRops[6] = 0x100;
|
||||
c2->dwRops[7] = 0x8000000;
|
||||
c2->ddsOldCaps.dwCaps = 0x421350;
|
||||
c2->dwSVBCaps = 0xF4C08241;
|
||||
c2->dwSVBCKeyCaps = 0x200;
|
||||
c2->dwSVBFXCaps = 0x3FCE3;
|
||||
//for(int j=0; j<DD_ROP_SPACE; j++) c2->dwSVBRops[j]=0;
|
||||
c2->dwSVBRops[0] = 0x1;
|
||||
c2->dwSVBRops[6] = 0x100;
|
||||
c2->dwSVBRops[7] = 0x8000000;
|
||||
c2->dwVSBCaps = 0xF4C08241;
|
||||
c2->dwVSBCKeyCaps = 0x200;
|
||||
c2->dwVSBFXCaps = 0x3FCE3;
|
||||
//for(int j=0; j<DD_ROP_SPACE; j++) c2->dwVSBRops[j]=0;
|
||||
c2->dwVSBRops[0] = 0x1;
|
||||
c2->dwVSBRops[6] = 0x100;
|
||||
c2->dwVSBRops[7] = 0x8000000;
|
||||
c2->dwSSBCaps = 0xF4C08241;
|
||||
c2->dwSSBCKeyCaps = 0x200;
|
||||
c2->dwSSBFXCaps = 0x3FCE3;
|
||||
}
|
||||
if(dwSize > (int)0x13c) {
|
||||
//for(int j=0; j<DD_ROP_SPACE; j++) c2->dwSSBRops[j]=0;
|
||||
c2->dwSSBRops[0] = 1;
|
||||
c2->dwSSBRops[6] = 0x100;
|
||||
c2->dwSSBRops[7] = 0x8000000;
|
||||
}
|
||||
if(dwSize > (int)0x16C) {
|
||||
c2->ddsCaps.dwCaps = 0x421350;
|
||||
c2->ddsCaps.dwCaps2 = 0x200;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
@ -18,10 +18,9 @@
|
||||
#define _Warn(s)
|
||||
#endif
|
||||
|
||||
|
||||
extern ReleaseDC_Type pReleaseDC;
|
||||
extern HandleDDThreadLock_Type pReleaseDDThreadLock;
|
||||
extern GetDC_Type pGetDC;
|
||||
extern GetDC_Type pGetDCMethod();
|
||||
extern ReleaseDC_Type pReleaseDCMethod();
|
||||
|
||||
/*---------------------------------------------------------------------------------+
|
||||
| |
|
||||
@ -56,8 +55,6 @@ HDC dxwSDC::GetPrimaryDC(HDC hdc)
|
||||
{
|
||||
HRESULT res;
|
||||
extern HandleDDThreadLock_Type pReleaseDDThreadLock;
|
||||
extern GetDC_Type pGetDC;
|
||||
extern ReleaseDC_Type pReleaseDC;
|
||||
extern void *lpD3DActiveDevice;
|
||||
|
||||
OutTraceB("dxwSDC::GetPrimaryDC: hdc=%x\n", hdc);
|
||||
@ -67,12 +64,12 @@ HDC dxwSDC::GetPrimaryDC(HDC hdc)
|
||||
lpDDSPrimary = dxwss.GetPrimarySurface();
|
||||
if (lpDDSPrimary) {
|
||||
if(pReleaseDDThreadLock)(*pReleaseDDThreadLock)();
|
||||
res=((*pGetDC)(lpDDSPrimary, &PrimaryDC));
|
||||
res=((*pGetDCMethod())(lpDDSPrimary, &PrimaryDC));
|
||||
while((PrimaryDC == NULL) && lpDDSPrimary) {
|
||||
OutTraceB("dxwSDC::GetPrimaryDC: found primary surface with no DC, unref lpdds=%x\n", lpDDSPrimary);
|
||||
dxwss.UnrefSurface(lpDDSPrimary);
|
||||
lpDDSPrimary = dxwss.GetPrimarySurface();
|
||||
if (lpDDSPrimary) (*pGetDC)(lpDDSPrimary, &PrimaryDC);
|
||||
if (lpDDSPrimary) (*pGetDCMethod())(lpDDSPrimary, &PrimaryDC);
|
||||
}
|
||||
if (!PrimaryDC) {
|
||||
_Warn("No primary DC");
|
||||
@ -219,7 +216,6 @@ HDC dxwSDC::GetHdc(void)
|
||||
|
||||
BOOL dxwSDC::PutPrimaryDC(HDC hdc, BOOL UpdateScreen, int XDest, int YDest, int nDestWidth, int nDestHeight)
|
||||
{
|
||||
extern ReleaseDC_Type pReleaseDC;
|
||||
extern Unlock1_Type pUnlock1;
|
||||
BOOL ret;
|
||||
HRESULT res;
|
||||
@ -250,7 +246,7 @@ BOOL dxwSDC::PutPrimaryDC(HDC hdc, BOOL UpdateScreen, int XDest, int YDest, int
|
||||
if(!ret || (ret==GDI_ERROR)) {
|
||||
OutTraceE("dxwSDC::PutPrimaryDC: BitBlt ERROR ret=%x err=%d\n", ret, GetLastError());
|
||||
}
|
||||
res=(*pReleaseDC)(lpDDSPrimary, PrimaryDC);
|
||||
res=(*pReleaseDCMethod())(lpDDSPrimary, PrimaryDC);
|
||||
if(res){
|
||||
OutTraceE("dxwSDC::PutPrimaryDC: ReleaseDC ERROR res=%x\n", res);
|
||||
}
|
||||
@ -284,7 +280,7 @@ BOOL dxwSDC::PutPrimaryDC(HDC hdc, BOOL UpdateScreen, int XDest, int YDest, int
|
||||
else {
|
||||
switch(VirtualSurfaceType){
|
||||
case VIRTUAL_ON_DDRAW:
|
||||
res=(*pReleaseDC)(lpDDSPrimary, PrimaryDC);
|
||||
res=(*pReleaseDCMethod())(lpDDSPrimary, PrimaryDC);
|
||||
if(res){
|
||||
OutTraceE("dxwSDC::PutPrimaryDC: ReleaseDC ERROR res=%x\n", res);
|
||||
}
|
||||
|
@ -108,10 +108,10 @@ static HookEntryEx_Type Hooks[]={
|
||||
{HOOK_IAT_CANDIDATE, 0, "UpdateWindow", (FARPROC)NULL, (FARPROC *)&pUpdateWindow, (FARPROC)extUpdateWindow},
|
||||
//{HOOK_IAT_CANDIDATE, 0, "GetWindowPlacement", (FARPROC)NULL, (FARPROC *)&pGetWindowPlacement, (FARPROC)extGetWindowPlacement},
|
||||
//{HOOK_IAT_CANDIDATE, 0, "SetWindowPlacement", (FARPROC)NULL, (FARPROC *)&pSetWindowPlacement, (FARPROC)extSetWindowPlacement},
|
||||
{HOOK_HOT_CANDIDATE, 0, "ChangeDisplaySettingsA", (FARPROC)ChangeDisplaySettingsA, (FARPROC *)&pChangeDisplaySettingsA, (FARPROC)extChangeDisplaySettingsA},
|
||||
{HOOK_HOT_CANDIDATE, 0, "ChangeDisplaySettingsExA", (FARPROC)ChangeDisplaySettingsExA, (FARPROC *)&pChangeDisplaySettingsExA, (FARPROC)extChangeDisplaySettingsExA},
|
||||
{HOOK_HOT_CANDIDATE, 0, "ChangeDisplaySettingsW", (FARPROC)NULL, (FARPROC *)&pChangeDisplaySettingsW, (FARPROC)extChangeDisplaySettingsW}, // ref. by Knights of Honor
|
||||
{HOOK_HOT_CANDIDATE, 0, "ChangeDisplaySettingsExW", (FARPROC)NULL, (FARPROC *)&pChangeDisplaySettingsExW, (FARPROC)extChangeDisplaySettingsExW},
|
||||
{HOOK_HOT_CANDIDATE, 0x25, "ChangeDisplaySettingsA", (FARPROC)ChangeDisplaySettingsA, (FARPROC *)&pChangeDisplaySettingsA, (FARPROC)extChangeDisplaySettingsA},
|
||||
{HOOK_HOT_CANDIDATE, 0x26, "ChangeDisplaySettingsExA", (FARPROC)ChangeDisplaySettingsExA, (FARPROC *)&pChangeDisplaySettingsExA, (FARPROC)extChangeDisplaySettingsExA},
|
||||
{HOOK_HOT_CANDIDATE, 0x28, "ChangeDisplaySettingsW", (FARPROC)NULL, (FARPROC *)&pChangeDisplaySettingsW, (FARPROC)extChangeDisplaySettingsW}, // ref. by Knights of Honor
|
||||
{HOOK_HOT_CANDIDATE, 0x27, "ChangeDisplaySettingsExW", (FARPROC)NULL, (FARPROC *)&pChangeDisplaySettingsExW, (FARPROC)extChangeDisplaySettingsExW},
|
||||
{HOOK_HOT_CANDIDATE, 0, "GetMonitorInfoA", (FARPROC)GetMonitorInfoA, (FARPROC *)&pGetMonitorInfoA, (FARPROC)extGetMonitorInfoA},
|
||||
{HOOK_HOT_CANDIDATE, 0, "GetMonitorInfoW", (FARPROC)GetMonitorInfoW, (FARPROC *)&pGetMonitorInfoW, (FARPROC)extGetMonitorInfoW},
|
||||
{HOOK_HOT_CANDIDATE, 0, "ShowCursor", (FARPROC)ShowCursor, (FARPROC *)&pShowCursor, (FARPROC)extShowCursor},
|
||||
@ -359,9 +359,9 @@ RECT ClipRegion;
|
||||
int LastCurPosX, LastCurPosY;
|
||||
|
||||
extern GetDC_Type pGetDC;
|
||||
extern ReleaseDC_Type pReleaseDC;
|
||||
extern ReleaseDC_Type pReleaseDC1;
|
||||
//extern void FixWindowFrame(HWND);
|
||||
extern HRESULT WINAPI sBlt(char *, LPDIRECTDRAWSURFACE, LPRECT, LPDIRECTDRAWSURFACE, LPRECT, DWORD, LPDDBLTFX, BOOL);
|
||||
extern HRESULT WINAPI sBlt(int, Blt_Type, char *, LPDIRECTDRAWSURFACE, LPRECT, LPDIRECTDRAWSURFACE, LPRECT, DWORD, LPDDBLTFX, BOOL);
|
||||
|
||||
LONG WINAPI MyChangeDisplaySettings(char *fname, BOOL WideChar, void *lpDevMode, DWORD dwflags)
|
||||
{
|
||||
|
@ -47,6 +47,8 @@ void CTabDebug::DoDataExchange(CDataExchange* pDX)
|
||||
DDX_Check(pDX, IDC_HOTPATCHALWAYS, cTarget->m_HotPatchAlways);
|
||||
DDX_Check(pDX, IDC_FREEZEINJECTEDSON, cTarget->m_FreezeInjectedSon);
|
||||
DDX_Check(pDX, IDC_STRESSRESOURCES, cTarget->m_StressResources);
|
||||
DDX_Check(pDX, IDC_FULLRECTBLT, cTarget->m_FullRectBlt);
|
||||
DDX_Check(pDX, IDC_CENTERTOWIN, cTarget->m_CenterToWin);
|
||||
// DDX_Check(pDX, IDC_NOSYSTEMMEMORY, cTarget->m_NoSystemMemory);
|
||||
}
|
||||
|
||||
|
@ -33,8 +33,6 @@ void CTabDirect3D::DoDataExchange(CDataExchange* pDX)
|
||||
DDX_Check(pDX, IDC_NOPOWER2FIX, cTarget->m_NoPower2Fix);
|
||||
DDX_Check(pDX, IDC_NOD3DRESET, cTarget->m_NoD3DReset);
|
||||
DDX_Check(pDX, IDC_SUPPRESSD3DEXT, cTarget->m_SuppressD3DExt);
|
||||
DDX_Check(pDX, IDC_FORCESHEL, cTarget->m_ForcesHEL);
|
||||
DDX_Check(pDX, IDC_SETZBUFFERBITDEPTHS, cTarget->m_SetZBufferBitDepths);
|
||||
|
||||
// Ddraw tweaks
|
||||
DDX_Check(pDX, IDC_NOSYSMEMPRIMARY, cTarget->m_NoSysMemPrimary);
|
||||
@ -43,8 +41,9 @@ void CTabDirect3D::DoDataExchange(CDataExchange* pDX)
|
||||
DDX_Check(pDX, IDC_POWER2WIDTH, cTarget->m_Power2Width);
|
||||
DDX_Check(pDX, IDC_FIXREFCOUNTER, cTarget->m_FixRefCounter);
|
||||
DDX_Check(pDX, IDC_RETURNNULLREF, cTarget->m_ReturnNullRef);
|
||||
DDX_Check(pDX, IDC_FULLRECTBLT, cTarget->m_FullRectBlt);
|
||||
DDX_Check(pDX, IDC_CENTERTOWIN, cTarget->m_CenterToWin);
|
||||
DDX_Check(pDX, IDC_FORCESHEL, cTarget->m_ForcesHEL);
|
||||
DDX_Check(pDX, IDC_MINIMALCAPS, cTarget->m_MinimalCaps);
|
||||
DDX_Check(pDX, IDC_SETZBUFFERBITDEPTHS, cTarget->m_SetZBufferBitDepths);
|
||||
DDX_Check(pDX, IDC_DEINTERLACE, cTarget->m_Deinterlace);
|
||||
DDX_Check(pDX, IDC_LIMITDDRAW, cTarget->m_LimitDdraw);
|
||||
DDX_CBIndex(pDX, IDC_DDWAWLIMITCOMBO, cTarget->m_MaxDdrawInterface);
|
||||
|
@ -67,6 +67,7 @@ CTargetDlg::CTargetDlg(CWnd* pParent /*=NULL*/)
|
||||
m_NoImagehlp = FALSE;
|
||||
m_ReplacePrivOps = FALSE;
|
||||
m_ForcesHEL = FALSE;
|
||||
m_MinimalCaps = FALSE;
|
||||
m_SetZBufferBitDepths = FALSE;
|
||||
m_ForcesSwapEffect = FALSE;
|
||||
m_ColorFix = FALSE;
|
||||
|
@ -206,6 +206,7 @@ public:
|
||||
BOOL m_DisableDisableAltTab;
|
||||
BOOL m_NoImagehlp;
|
||||
BOOL m_ForcesHEL;
|
||||
BOOL m_MinimalCaps;
|
||||
BOOL m_SetZBufferBitDepths;
|
||||
BOOL m_ForcesSwapEffect;
|
||||
BOOL m_ColorFix;
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -324,6 +324,7 @@ void SetTargetFromDlg(TARGETMAP *t, CTargetDlg *dlg)
|
||||
if(dlg->m_DisableDisableAltTab) t->flags7 |= DISABLEDISABLEALTTAB;
|
||||
if(dlg->m_NoImagehlp) t->flags5 |= NOIMAGEHLP;
|
||||
if(dlg->m_ForcesHEL) t->flags3 |= FORCESHEL;
|
||||
if(dlg->m_MinimalCaps) t->flags3 |= MINIMALCAPS;
|
||||
if(dlg->m_SetZBufferBitDepths) t->flags6 |= SETZBUFFERBITDEPTHS;
|
||||
if(dlg->m_ForcesSwapEffect) t->flags6 |= FORCESWAPEFFECT;
|
||||
if(dlg->m_ColorFix) t->flags3 |= COLORFIX;
|
||||
@ -558,6 +559,7 @@ static void SetDlgFromTarget(TARGETMAP *t, CTargetDlg *dlg)
|
||||
dlg->m_DisableDisableAltTab = t->flags7 & DISABLEDISABLEALTTAB ? 1 : 0;
|
||||
dlg->m_NoImagehlp = t->flags5 & NOIMAGEHLP ? 1 : 0;
|
||||
dlg->m_ForcesHEL = t->flags3 & FORCESHEL ? 1 : 0;
|
||||
dlg->m_MinimalCaps = t->flags3 & MINIMALCAPS ? 1 : 0;
|
||||
dlg->m_SetZBufferBitDepths = t->flags6 & SETZBUFFERBITDEPTHS ? 1 : 0;
|
||||
dlg->m_ForcesSwapEffect = t->flags6 & FORCESWAPEFFECT ? 1 : 0;
|
||||
dlg->m_ColorFix = t->flags3 & COLORFIX ? 1 : 0;
|
||||
|
BIN
host/host.aps
BIN
host/host.aps
Binary file not shown.
BIN
host/resource
BIN
host/resource
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user