mirror of
https://github.com/DxWnd/DxWnd.reloaded
synced 2024-12-30 09:25:35 +01:00
v2_03_50_src
Former-commit-id: f4660317a5ae4ef5de3fe2d7cb1f2d3a3253c477
This commit is contained in:
parent
45b65b9611
commit
9385cb7fe1
@ -822,7 +822,7 @@ typedef LPDICONFIGUREDEVICESPARAMSA LPDICONFIGUREDEVICESPARAMS;
|
||||
typedef const DICONFIGUREDEVICESPARAMSA *LPCDICONFIGUREDEVICESPARAMSA;
|
||||
typedef const DICONFIGUREDEVICESPARAMSW *LPCDICONFIGUREDEVICESPARAMSW;
|
||||
#ifdef UNICODE
|
||||
typedef DICONFIGUREDEVICESPARAMSW DICONFIGUREDEVICESPARAMS;
|
||||
typedef DCIONFIGUREDEVICESPARAMSW DICONFIGUREDEVICESPARAMS;
|
||||
typedef LPCDICONFIGUREDEVICESPARAMSW LPCDICONFIGUREDEVICESPARAMS;
|
||||
#else
|
||||
typedef DICONFIGUREDEVICESPARAMSA DICONFIGUREDEVICESPARAMS;
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:60fd77705e2eacd38c4bc60177d1f90e73b8a19e6bcd615465449f5b59eec3e5
|
||||
size 622592
|
||||
oid sha256:58984ac106a91ee758fe27b885e80e4c0c07d1d5de6105c9a397032410db5b4c
|
||||
size 626176
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:49ce540832a013e5fe01bbacfdbbeb19232c1205a8ac94ba391ba85cfb2b6b13
|
||||
oid sha256:7e22776dc66acf9e798458cd8bf1e95195ee0577c99153c150b1a8e69e704b8f
|
||||
size 546816
|
||||
|
908
build/dxwnd.ini
Normal file
908
build/dxwnd.ini
Normal file
@ -0,0 +1,908 @@
|
||||
[window]
|
||||
exportpath=D:\DxWnd\v2_03_50_src\build\exports\
|
||||
posx=1045
|
||||
posy=439
|
||||
sizx=492
|
||||
sizy=367
|
||||
exepath=D:\Games\SWAT 3 (GOG)\game\
|
||||
debug=1
|
||||
[target]
|
||||
title0=Command & Conquer - Red Alert The Aftermath
|
||||
path0=D:\Games\C&C - Red Alert The Aftermath\RA95.EXE
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
notes0=
|
||||
registry0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=136368226
|
||||
flagg0=1224740864
|
||||
flagh0=532
|
||||
flagi0=138412036
|
||||
flagj0=4224
|
||||
flagk0=262144
|
||||
tflag0=-1476388605
|
||||
initx0=0
|
||||
inity0=0
|
||||
minx0=0
|
||||
miny0=0
|
||||
maxx0=0
|
||||
maxy0=0
|
||||
posx0=50
|
||||
posy0=50
|
||||
sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=4
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
swapeffect0=0
|
||||
title1=hlp.exe
|
||||
path1=D:\Games\DylanDog\hlp.exe
|
||||
launchpath1=
|
||||
module1=
|
||||
opengllib1=
|
||||
notes1=
|
||||
registry1=
|
||||
ver1=0
|
||||
coord1=0
|
||||
flag1=2097184
|
||||
flagg1=1207959552
|
||||
flagh1=1048596
|
||||
flagi1=138412038
|
||||
flagj1=4224
|
||||
flagk1=2
|
||||
tflag1=-2147477245
|
||||
initx1=0
|
||||
inity1=0
|
||||
minx1=0
|
||||
miny1=0
|
||||
maxx1=0
|
||||
maxy1=0
|
||||
posx1=50
|
||||
posy1=50
|
||||
sizx1=800
|
||||
sizy1=600
|
||||
maxfps1=0
|
||||
initts1=0
|
||||
winver1=0
|
||||
maxres1=-1
|
||||
swapeffect1=0
|
||||
title2=Riven DVD
|
||||
path2=D:\Games\Riven\Riven.patched.exe
|
||||
launchpath2=
|
||||
module2=
|
||||
opengllib2=
|
||||
notes2=
|
||||
registry2=
|
||||
ver2=0
|
||||
coord2=0
|
||||
flag2=673185824
|
||||
flagg2=1207959552
|
||||
flagh2=20
|
||||
flagi2=138412036
|
||||
flagj2=67108992
|
||||
flagk2=33554432
|
||||
tflag2=-2147477245
|
||||
initx2=0
|
||||
inity2=0
|
||||
minx2=0
|
||||
miny2=0
|
||||
maxx2=0
|
||||
maxy2=0
|
||||
posx2=50
|
||||
posy2=50
|
||||
sizx2=800
|
||||
sizy2=600
|
||||
maxfps2=0
|
||||
initts2=0
|
||||
winver2=0
|
||||
maxres2=-1
|
||||
swapeffect2=0
|
||||
title3=Rogue Squadron.EXE
|
||||
path3=D:\Games\Rogue Squadron 3D\Rogue Squadron.EXE
|
||||
launchpath3=
|
||||
module3=
|
||||
opengllib3=
|
||||
notes3=
|
||||
registry3=
|
||||
ver3=0
|
||||
coord3=0
|
||||
flag3=136314914
|
||||
flagg3=1207959552
|
||||
flagh3=20
|
||||
flagi3=138412036
|
||||
flagj3=4224
|
||||
flagk3=65536
|
||||
tflag3=0
|
||||
initx3=0
|
||||
inity3=0
|
||||
minx3=0
|
||||
miny3=0
|
||||
maxx3=0
|
||||
maxy3=0
|
||||
posx3=50
|
||||
posy3=50
|
||||
sizx3=800
|
||||
sizy3=600
|
||||
maxfps3=0
|
||||
initts3=0
|
||||
winver3=0
|
||||
maxres3=-1
|
||||
swapeffect3=0
|
||||
title4=Geneforge
|
||||
path4=d:\games\Geneforge\Geneforge.exe
|
||||
launchpath4=
|
||||
module4=
|
||||
opengllib4=
|
||||
notes4=
|
||||
registry4=
|
||||
ver4=0
|
||||
coord4=0
|
||||
flag4=134234628
|
||||
flagg4=1207959808
|
||||
flagh4=65620
|
||||
flagi4=4194308
|
||||
flagj4=0
|
||||
flagk4=0
|
||||
tflag4=64
|
||||
initx4=0
|
||||
inity4=0
|
||||
minx4=0
|
||||
miny4=0
|
||||
maxx4=0
|
||||
maxy4=0
|
||||
posx4=50
|
||||
posy4=50
|
||||
sizx4=1200
|
||||
sizy4=900
|
||||
maxfps4=0
|
||||
initts4=0
|
||||
winver4=0
|
||||
maxres4=4
|
||||
swapeffect4=0
|
||||
title5=One Must Fall - Battlegrounds - Demo
|
||||
path5=D:\Games\One Must Fall - Battlegrounds - Demo\Engine\OMFBG.exe
|
||||
launchpath5=
|
||||
module5=
|
||||
opengllib5=
|
||||
notes5=
|
||||
registry5=
|
||||
ver5=0
|
||||
coord5=0
|
||||
flag5=136314914
|
||||
flagg5=1207959552
|
||||
flagh5=20
|
||||
flagi5=138412036
|
||||
flagj5=4224
|
||||
flagk5=65536
|
||||
tflag5=0
|
||||
initx5=0
|
||||
inity5=0
|
||||
minx5=0
|
||||
miny5=0
|
||||
maxx5=0
|
||||
maxy5=0
|
||||
posx5=50
|
||||
posy5=50
|
||||
sizx5=800
|
||||
sizy5=600
|
||||
maxfps5=0
|
||||
initts5=0
|
||||
winver5=0
|
||||
maxres5=-1
|
||||
swapeffect5=0
|
||||
title6=One Must Fall - Battlegrounds
|
||||
path6=D:\Games\One Must Fall - Battlegrounds\Engine\OMFBG.exe
|
||||
launchpath6=
|
||||
module6=core_module.dll
|
||||
opengllib6=
|
||||
notes6=
|
||||
registry6=
|
||||
ver6=0
|
||||
coord6=0
|
||||
flag6=136314915
|
||||
flagg6=1275068416
|
||||
flagh6=33554460
|
||||
flagi6=675283252
|
||||
flagj6=21120
|
||||
flagk6=458752
|
||||
tflag6=-2147477245
|
||||
initx6=0
|
||||
inity6=0
|
||||
minx6=0
|
||||
miny6=0
|
||||
maxx6=0
|
||||
maxy6=0
|
||||
posx6=50
|
||||
posy6=50
|
||||
sizx6=800
|
||||
sizy6=600
|
||||
maxfps6=0
|
||||
initts6=0
|
||||
winver6=0
|
||||
maxres6=-1
|
||||
swapeffect6=0
|
||||
title7=Geneforge 1 GOG
|
||||
path7=D:\Games\Geneforge GOG\Geneforge\Geneforge.exe
|
||||
launchpath7=
|
||||
module7=
|
||||
opengllib7=
|
||||
notes7=
|
||||
registry7=
|
||||
ver7=0
|
||||
coord7=0
|
||||
flag7=-2011160538
|
||||
flagg7=1241513984
|
||||
flagh7=20
|
||||
flagi7=138412036
|
||||
flagj7=4224
|
||||
flagk7=268500992
|
||||
tflag7=-2147477241
|
||||
initx7=0
|
||||
inity7=0
|
||||
minx7=0
|
||||
miny7=0
|
||||
maxx7=800
|
||||
maxy7=600
|
||||
posx7=50
|
||||
posy7=50
|
||||
sizx7=800
|
||||
sizy7=600
|
||||
maxfps7=0
|
||||
initts7=0
|
||||
winver7=0
|
||||
maxres7=-1
|
||||
swapeffect7=0
|
||||
title8=Geneforge 2 GOG
|
||||
path8=D:\Games\Geneforge GOG\Geneforge 2\Geneforge 2.exe
|
||||
launchpath8=
|
||||
module8=
|
||||
opengllib8=
|
||||
notes8=
|
||||
registry8=
|
||||
ver8=0
|
||||
coord8=0
|
||||
flag8=136315446
|
||||
flagg8=1207959552
|
||||
flagh8=20
|
||||
flagi8=138412036
|
||||
flagj8=4224
|
||||
flagk8=65536
|
||||
tflag8=-2147477245
|
||||
initx8=0
|
||||
inity8=0
|
||||
minx8=0
|
||||
miny8=0
|
||||
maxx8=800
|
||||
maxy8=600
|
||||
posx8=50
|
||||
posy8=50
|
||||
sizx8=800
|
||||
sizy8=600
|
||||
maxfps8=0
|
||||
initts8=0
|
||||
winver8=0
|
||||
maxres8=-1
|
||||
swapeffect8=0
|
||||
title9=Geneforge 3 GOG
|
||||
path9=D:\Games\Geneforge GOG\Geneforge 3\Geneforge 3.exe
|
||||
launchpath9=
|
||||
module9=
|
||||
opengllib9=
|
||||
notes9=
|
||||
registry9=
|
||||
ver9=0
|
||||
coord9=0
|
||||
flag9=136314886
|
||||
flagg9=1207959808
|
||||
flagh9=20
|
||||
flagi9=138412036
|
||||
flagj9=67113088
|
||||
flagk9=65536
|
||||
tflag9=0
|
||||
initx9=0
|
||||
inity9=0
|
||||
minx9=0
|
||||
miny9=0
|
||||
maxx9=0
|
||||
maxy9=0
|
||||
posx9=50
|
||||
posy9=50
|
||||
sizx9=800
|
||||
sizy9=600
|
||||
maxfps9=0
|
||||
initts9=0
|
||||
winver9=0
|
||||
maxres9=-1
|
||||
swapeffect9=0
|
||||
title10=Wizardry 8 (3DfX)
|
||||
path10=D:\Games\Wizardry 8\Wiz8.exe
|
||||
launchpath10=
|
||||
module10=
|
||||
opengllib10=
|
||||
notes10=
|
||||
registry10=
|
||||
ver10=9
|
||||
coord10=0
|
||||
flag10=134225922
|
||||
flagg10=1207959552
|
||||
flagh10=20
|
||||
flagi10=205520900
|
||||
flagj10=4224
|
||||
flagk10=0
|
||||
tflag10=0
|
||||
initx10=0
|
||||
inity10=0
|
||||
minx10=0
|
||||
miny10=0
|
||||
maxx10=0
|
||||
maxy10=0
|
||||
posx10=50
|
||||
posy10=50
|
||||
sizx10=800
|
||||
sizy10=600
|
||||
maxfps10=0
|
||||
initts10=0
|
||||
winver10=0
|
||||
maxres10=-1
|
||||
swapeffect10=0
|
||||
title11=Warcraft 2 Battlenet Ed
|
||||
path11=D:\Games\Warcraft 2 Battlenet Ed\Warcraft II BNE.exe
|
||||
launchpath11=
|
||||
module11=
|
||||
opengllib11=
|
||||
notes11=
|
||||
registry11=
|
||||
ver11=0
|
||||
coord11=0
|
||||
flag11=134221986
|
||||
flagg11=1207959552
|
||||
flagh11=20
|
||||
flagi11=138412036
|
||||
flagj11=128
|
||||
flagk11=0
|
||||
tflag11=0
|
||||
initx11=0
|
||||
inity11=0
|
||||
minx11=0
|
||||
miny11=0
|
||||
maxx11=0
|
||||
maxy11=0
|
||||
posx11=50
|
||||
posy11=50
|
||||
sizx11=800
|
||||
sizy11=600
|
||||
maxfps11=0
|
||||
initts11=0
|
||||
winver11=0
|
||||
maxres11=0
|
||||
swapeffect11=0
|
||||
title12=Star Wars Rogue Squadron 3D
|
||||
path12=D:\Games\rogue\Rogue Squadron.EXE
|
||||
launchpath12=
|
||||
module12=
|
||||
opengllib12=
|
||||
notes12=
|
||||
registry12=
|
||||
ver12=0
|
||||
coord12=0
|
||||
flag12=136314934
|
||||
flagg12=1207959552
|
||||
flagh12=20
|
||||
flagi12=138412038
|
||||
flagj12=4224
|
||||
flagk12=402718720
|
||||
tflag12=0
|
||||
initx12=0
|
||||
inity12=0
|
||||
minx12=0
|
||||
miny12=0
|
||||
maxx12=0
|
||||
maxy12=0
|
||||
posx12=50
|
||||
posy12=50
|
||||
sizx12=800
|
||||
sizy12=600
|
||||
maxfps12=0
|
||||
initts12=0
|
||||
winver12=0
|
||||
maxres12=-1
|
||||
swapeffect12=0
|
||||
title13=Dark Colony
|
||||
path13=D:\Games\DarkColony\DCOLONY\DC.EXE
|
||||
launchpath13=
|
||||
module13=
|
||||
opengllib13=
|
||||
notes13=
|
||||
registry13=
|
||||
ver13=0
|
||||
coord13=0
|
||||
flag13=134255138
|
||||
flagg13=1207963648
|
||||
flagh13=20
|
||||
flagi13=4194308
|
||||
flagj13=67108992
|
||||
flagk13=0
|
||||
tflag13=0
|
||||
initx13=0
|
||||
inity13=0
|
||||
minx13=0
|
||||
miny13=0
|
||||
maxx13=0
|
||||
maxy13=0
|
||||
posx13=50
|
||||
posy13=50
|
||||
sizx13=800
|
||||
sizy13=600
|
||||
maxfps13=20
|
||||
initts13=0
|
||||
winver13=0
|
||||
maxres13=-1
|
||||
swapeffect13=0
|
||||
title14=Empire of the Ants
|
||||
path14=D:\Games\Empire of the Ants\Game.exe
|
||||
launchpath14=
|
||||
module14=
|
||||
opengllib14=
|
||||
notes14=
|
||||
registry14=
|
||||
ver14=0
|
||||
coord14=0
|
||||
flag14=402669606
|
||||
flagg14=1207959552
|
||||
flagh14=20
|
||||
flagi14=4194308
|
||||
flagj14=128
|
||||
flagk14=65536
|
||||
tflag14=0
|
||||
initx14=0
|
||||
inity14=0
|
||||
minx14=0
|
||||
miny14=0
|
||||
maxx14=0
|
||||
maxy14=0
|
||||
posx14=50
|
||||
posy14=50
|
||||
sizx14=800
|
||||
sizy14=600
|
||||
maxfps14=0
|
||||
initts14=0
|
||||
winver14=0
|
||||
maxres14=-1
|
||||
swapeffect14=0
|
||||
title15=Paladin 3 RIP
|
||||
path15=D:\Games\QGPAL3\rungame.exe
|
||||
launchpath15=
|
||||
module15=
|
||||
opengllib15=
|
||||
notes15=
|
||||
registry15=
|
||||
ver15=0
|
||||
coord15=0
|
||||
flag15=136314914
|
||||
flagg15=1207959552
|
||||
flagh15=20
|
||||
flagi15=205520900
|
||||
flagj15=4224
|
||||
flagk15=65536
|
||||
tflag15=-2147477245
|
||||
initx15=0
|
||||
inity15=0
|
||||
minx15=0
|
||||
miny15=0
|
||||
maxx15=0
|
||||
maxy15=0
|
||||
posx15=50
|
||||
posy15=50
|
||||
sizx15=800
|
||||
sizy15=600
|
||||
maxfps15=0
|
||||
initts15=0
|
||||
winver15=0
|
||||
maxres15=-1
|
||||
swapeffect15=0
|
||||
title16=Revenant (GOG)
|
||||
path16=D:\Games\Revenant GOG\Revenant.exe
|
||||
launchpath16=D:\Games\Revenant GOG\Launcher.exe
|
||||
module16=
|
||||
opengllib16=
|
||||
notes16=
|
||||
registry16=
|
||||
ver16=0
|
||||
coord16=3
|
||||
flag16=1019216498
|
||||
flagg16=1207959552
|
||||
flagh16=20
|
||||
flagi16=138412036
|
||||
flagj16=134218368
|
||||
flagk16=2162696
|
||||
tflag16=-2147477245
|
||||
initx16=0
|
||||
inity16=0
|
||||
minx16=0
|
||||
miny16=0
|
||||
maxx16=0
|
||||
maxy16=0
|
||||
posx16=50
|
||||
posy16=50
|
||||
sizx16=800
|
||||
sizy16=600
|
||||
maxfps16=0
|
||||
initts16=0
|
||||
winver16=0
|
||||
maxres16=-1
|
||||
swapeffect16=0
|
||||
title17=Revenant.exe
|
||||
path17=D:\Games\Revenant GOG\Disk2\Revenant.exe
|
||||
launchpath17=
|
||||
module17=
|
||||
opengllib17=
|
||||
notes17=
|
||||
registry17=
|
||||
ver17=0
|
||||
coord17=0
|
||||
flag17=136314914
|
||||
flagg17=1207959552
|
||||
flagh17=20
|
||||
flagi17=134217732
|
||||
flagj17=4224
|
||||
flagk17=65536
|
||||
tflag17=0
|
||||
initx17=0
|
||||
inity17=0
|
||||
minx17=0
|
||||
miny17=0
|
||||
maxx17=0
|
||||
maxy17=0
|
||||
posx17=50
|
||||
posy17=50
|
||||
sizx17=800
|
||||
sizy17=600
|
||||
maxfps17=0
|
||||
initts17=0
|
||||
winver17=0
|
||||
maxres17=-1
|
||||
swapeffect17=0
|
||||
title18=Revenant - No Cd.exe
|
||||
path18=D:\Games\Revenant\Revenant - No Cd.exe
|
||||
launchpath18=
|
||||
module18=
|
||||
opengllib18=
|
||||
notes18=
|
||||
registry18=
|
||||
ver18=0
|
||||
coord18=0
|
||||
flag18=136314914
|
||||
flagg18=1207959552
|
||||
flagh18=20
|
||||
flagi18=138412036
|
||||
flagj18=4224
|
||||
flagk18=65536
|
||||
tflag18=-2147477245
|
||||
initx18=0
|
||||
inity18=0
|
||||
minx18=0
|
||||
miny18=0
|
||||
maxx18=0
|
||||
maxy18=0
|
||||
posx18=50
|
||||
posy18=50
|
||||
sizx18=800
|
||||
sizy18=600
|
||||
maxfps18=0
|
||||
initts18=0
|
||||
winver18=0
|
||||
maxres18=-1
|
||||
swapeffect18=0
|
||||
title19=Enemy Zero
|
||||
path19=F:\EZERO\EZERO.EXE
|
||||
launchpath19=
|
||||
module19=
|
||||
opengllib19=
|
||||
notes19=
|
||||
registry19=
|
||||
ver19=0
|
||||
coord19=0
|
||||
flag19=681574434
|
||||
flagg19=1207959552
|
||||
flagh19=20
|
||||
flagi19=138412036
|
||||
flagj19=4224
|
||||
flagk19=65536
|
||||
tflag19=-2147477245
|
||||
initx19=0
|
||||
inity19=0
|
||||
minx19=0
|
||||
miny19=0
|
||||
maxx19=0
|
||||
maxy19=0
|
||||
posx19=50
|
||||
posy19=50
|
||||
sizx19=800
|
||||
sizy19=600
|
||||
maxfps19=0
|
||||
initts19=0
|
||||
winver19=0
|
||||
maxres19=-1
|
||||
swapeffect19=0
|
||||
title20=Revenant ICD GOG
|
||||
path20=D:\Games\Revenant GOG\Revenant.icd
|
||||
launchpath20=
|
||||
module20=
|
||||
opengllib20=
|
||||
notes20=
|
||||
registry20=
|
||||
ver20=0
|
||||
coord20=0
|
||||
flag20=681574434
|
||||
flagg20=1207959552
|
||||
flagh20=20
|
||||
flagi20=138412036
|
||||
flagj20=4224
|
||||
flagk20=65536
|
||||
tflag20=0
|
||||
initx20=0
|
||||
inity20=0
|
||||
minx20=0
|
||||
miny20=0
|
||||
maxx20=0
|
||||
maxy20=0
|
||||
posx20=50
|
||||
posy20=50
|
||||
sizx20=800
|
||||
sizy20=600
|
||||
maxfps20=0
|
||||
initts20=0
|
||||
winver20=0
|
||||
maxres20=-1
|
||||
swapeffect20=0
|
||||
title21=Geneforge 4 (Steam)
|
||||
path21=D:\Program Files (x86)\Steam\SteamApps\common\Geneforge 4\Geneforge 4.exe
|
||||
launchpath21=
|
||||
module21=
|
||||
opengllib21=
|
||||
notes21=
|
||||
registry21=
|
||||
ver21=0
|
||||
coord21=0
|
||||
flag21=136314934
|
||||
flagg21=1207959552
|
||||
flagh21=20
|
||||
flagi21=138412036
|
||||
flagj21=5248
|
||||
flagk21=65536
|
||||
tflag21=0
|
||||
initx21=0
|
||||
inity21=0
|
||||
minx21=0
|
||||
miny21=0
|
||||
maxx21=1024
|
||||
maxy21=768
|
||||
posx21=50
|
||||
posy21=50
|
||||
sizx21=800
|
||||
sizy21=600
|
||||
maxfps21=0
|
||||
initts21=0
|
||||
winver21=0
|
||||
maxres21=-1
|
||||
swapeffect21=0
|
||||
title22=Geneforge (Steam)
|
||||
path22=D:\Program Files (x86)\Steam\SteamApps\common\Geneforge\Geneforge.exe
|
||||
launchpath22=
|
||||
module22=
|
||||
opengllib22=
|
||||
notes22=
|
||||
registry22=
|
||||
ver22=0
|
||||
coord22=0
|
||||
flag22=136314902
|
||||
flagg22=1207959552
|
||||
flagh22=20
|
||||
flagi22=138412036
|
||||
flagj22=4224
|
||||
flagk22=65536
|
||||
tflag22=-2147477237
|
||||
initx22=400
|
||||
inity22=300
|
||||
minx22=0
|
||||
miny22=0
|
||||
maxx22=800
|
||||
maxy22=600
|
||||
posx22=50
|
||||
posy22=50
|
||||
sizx22=800
|
||||
sizy22=600
|
||||
maxfps22=0
|
||||
initts22=0
|
||||
winver22=0
|
||||
maxres22=-1
|
||||
swapeffect22=0
|
||||
title23=Geneforge 2 (Steam)
|
||||
path23=D:\Program Files (x86)\Steam\SteamApps\common\Geneforge 2\Geneforge 2.exe
|
||||
launchpath23=
|
||||
module23=
|
||||
opengllib23=
|
||||
notes23=
|
||||
registry23=
|
||||
ver23=0
|
||||
coord23=0
|
||||
flag23=136314886
|
||||
flagg23=1207959552
|
||||
flagh23=20
|
||||
flagi23=138412036
|
||||
flagj23=4224
|
||||
flagk23=268503040
|
||||
tflag23=-2147477245
|
||||
initx23=0
|
||||
inity23=0
|
||||
minx23=0
|
||||
miny23=0
|
||||
maxx23=0
|
||||
maxy23=0
|
||||
posx23=50
|
||||
posy23=50
|
||||
sizx23=800
|
||||
sizy23=600
|
||||
maxfps23=0
|
||||
initts23=0
|
||||
winver23=0
|
||||
maxres23=-1
|
||||
swapeffect23=0
|
||||
title24=Geneforge 3 (Steam)
|
||||
path24=D:\Program Files (x86)\Steam\SteamApps\common\Geneforge 3\Geneforge 3.exe
|
||||
launchpath24=
|
||||
module24=
|
||||
opengllib24=
|
||||
notes24=
|
||||
registry24=
|
||||
ver24=0
|
||||
coord24=0
|
||||
flag24=136314886
|
||||
flagg24=1207959552
|
||||
flagh24=20
|
||||
flagi24=138412036
|
||||
flagj24=4224
|
||||
flagk24=268500992
|
||||
tflag24=0
|
||||
initx24=0
|
||||
inity24=0
|
||||
minx24=0
|
||||
miny24=0
|
||||
maxx24=0
|
||||
maxy24=0
|
||||
posx24=50
|
||||
posy24=50
|
||||
sizx24=800
|
||||
sizy24=600
|
||||
maxfps24=0
|
||||
initts24=0
|
||||
winver24=0
|
||||
maxres24=-1
|
||||
swapeffect24=0
|
||||
title25=LEGO Pirates
|
||||
path25=d:\Games\Disney Interactive Studios\LEGO® Pirates\LEGOPirates.exe
|
||||
launchpath25=
|
||||
module25=
|
||||
opengllib25=
|
||||
notes25=
|
||||
registry25=
|
||||
ver25=9
|
||||
coord25=0
|
||||
flag25=136314914
|
||||
flagg25=1207959552
|
||||
flagh25=20
|
||||
flagi25=138412036
|
||||
flagj25=4224
|
||||
flagk25=65536
|
||||
tflag25=0
|
||||
initx25=0
|
||||
inity25=0
|
||||
minx25=0
|
||||
miny25=0
|
||||
maxx25=0
|
||||
maxy25=0
|
||||
posx25=50
|
||||
posy25=50
|
||||
sizx25=800
|
||||
sizy25=600
|
||||
maxfps25=0
|
||||
initts25=0
|
||||
winver25=0
|
||||
maxres25=-1
|
||||
swapeffect25=0
|
||||
title26=Deadlock II
|
||||
path26=D:\Games\deadlock II\DEADLOCK.EXE
|
||||
launchpath26=
|
||||
module26=
|
||||
opengllib26=
|
||||
notes26=
|
||||
registry26=
|
||||
ver26=7
|
||||
coord26=0
|
||||
flag26=-1996488672
|
||||
flagg26=1209008128
|
||||
flagh26=20
|
||||
flagi26=138420228
|
||||
flagj26=67108992
|
||||
flagk26=0
|
||||
tflag26=0
|
||||
initx26=0
|
||||
inity26=0
|
||||
minx26=0
|
||||
miny26=0
|
||||
maxx26=0
|
||||
maxy26=0
|
||||
posx26=50
|
||||
posy26=50
|
||||
sizx26=800
|
||||
sizy26=600
|
||||
maxfps26=0
|
||||
initts26=0
|
||||
winver26=0
|
||||
maxres26=-1
|
||||
swapeffect26=0
|
||||
title27=Swat 3
|
||||
path27=D:\Games\SWAT3\SWAT.EXE
|
||||
launchpath27=
|
||||
module27=
|
||||
opengllib27=
|
||||
notes27=
|
||||
registry27=
|
||||
ver27=0
|
||||
coord27=0
|
||||
flag27=136314914
|
||||
flagg27=1209008128
|
||||
flagh27=20
|
||||
flagi27=138412036
|
||||
flagj27=4224
|
||||
flagk27=65536
|
||||
tflag27=-2147477245
|
||||
initx27=0
|
||||
inity27=0
|
||||
minx27=0
|
||||
miny27=0
|
||||
maxx27=0
|
||||
maxy27=0
|
||||
posx27=50
|
||||
posy27=50
|
||||
sizx27=800
|
||||
sizy27=600
|
||||
maxfps27=0
|
||||
initts27=0
|
||||
winver27=0
|
||||
maxres27=-1
|
||||
swapeffect27=0
|
||||
title28=Swat 3 (GOG)
|
||||
path28=D:\Games\SWAT 3 (GOG)\game\swat.exe
|
||||
launchpath28=
|
||||
module28=
|
||||
opengllib28=
|
||||
notes28=
|
||||
registry28=
|
||||
ver28=1
|
||||
coord28=0
|
||||
flag28=136314914
|
||||
flagg28=1207959552
|
||||
flagh28=20
|
||||
flagi28=138412036
|
||||
flagj28=4224
|
||||
flagk28=65536
|
||||
tflag28=-2147477245
|
||||
initx28=0
|
||||
inity28=0
|
||||
minx28=0
|
||||
miny28=0
|
||||
maxx28=0
|
||||
maxy28=0
|
||||
posx28=50
|
||||
posy28=50
|
||||
sizx28=800
|
||||
sizy28=600
|
||||
maxfps28=0
|
||||
initts28=0
|
||||
winver28=0
|
||||
maxres28=-1
|
||||
swapeffect28=0
|
32
build/exports/Geneforge (Steam).dxw
Normal file
32
build/exports/Geneforge (Steam).dxw
Normal file
@ -0,0 +1,32 @@
|
||||
[target]
|
||||
title0=Geneforge (Steam)
|
||||
path0=D:\Program Files (x86)\Steam\SteamApps\common\Geneforge\Geneforge.exe
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
notes0=
|
||||
registry0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=136314918
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=134217732
|
||||
flagj0=4224
|
||||
flagk0=65536
|
||||
tflag0=0
|
||||
initx0=0
|
||||
inity0=0
|
||||
minx0=0
|
||||
miny0=0
|
||||
maxx0=0
|
||||
maxy0=0
|
||||
posx0=50
|
||||
posy0=50
|
||||
sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
swapeffect0=0
|
32
build/exports/Geneforge 2 (Steam).dxw
Normal file
32
build/exports/Geneforge 2 (Steam).dxw
Normal file
@ -0,0 +1,32 @@
|
||||
[target]
|
||||
title0=Geneforge 2 (Steam)
|
||||
path0=D:\Program Files (x86)\Steam\SteamApps\common\Geneforge 2\Geneforge 2.exe
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
notes0=
|
||||
registry0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=136314918
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=138412036
|
||||
flagj0=4224
|
||||
flagk0=67584
|
||||
tflag0=0
|
||||
initx0=0
|
||||
inity0=0
|
||||
minx0=0
|
||||
miny0=0
|
||||
maxx0=0
|
||||
maxy0=0
|
||||
posx0=50
|
||||
posy0=50
|
||||
sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
swapeffect0=0
|
32
build/exports/Geneforge 3 (Steam).dxw
Normal file
32
build/exports/Geneforge 3 (Steam).dxw
Normal file
@ -0,0 +1,32 @@
|
||||
[target]
|
||||
title0=Geneforge 3 (Steam)
|
||||
path0=D:\Program Files (x86)\Steam\SteamApps\common\Geneforge 3\Geneforge 3.exe
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
notes0=
|
||||
registry0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=136314918
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=138412036
|
||||
flagj0=4224
|
||||
flagk0=65536
|
||||
tflag0=0
|
||||
initx0=0
|
||||
inity0=0
|
||||
minx0=0
|
||||
miny0=0
|
||||
maxx0=0
|
||||
maxy0=0
|
||||
posx0=50
|
||||
posy0=50
|
||||
sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
swapeffect0=0
|
32
build/exports/Geneforge 4 (Steam).dxw
Normal file
32
build/exports/Geneforge 4 (Steam).dxw
Normal file
@ -0,0 +1,32 @@
|
||||
[target]
|
||||
title0=Geneforge 4 (Steam)
|
||||
path0=D:\Program Files (x86)\Steam\SteamApps\common\Geneforge 4\Geneforge 4.exe
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
notes0=
|
||||
registry0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=136314918
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=134217732
|
||||
flagj0=4224
|
||||
flagk0=65536
|
||||
tflag0=0
|
||||
initx0=0
|
||||
inity0=0
|
||||
minx0=0
|
||||
miny0=0
|
||||
maxx0=0
|
||||
maxy0=0
|
||||
posx0=50
|
||||
posy0=50
|
||||
sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
swapeffect0=0
|
32
build/exports/LEGO Pirates.dxw
Normal file
32
build/exports/LEGO Pirates.dxw
Normal file
@ -0,0 +1,32 @@
|
||||
[target]
|
||||
title0=LEGO Pirates
|
||||
path0=d:\Games\Disney Interactive Studios\LEGO® Pirates\LEGOPirates.exe
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
notes0=
|
||||
registry0=
|
||||
ver0=9
|
||||
coord0=0
|
||||
flag0=136314914
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=138412036
|
||||
flagj0=4224
|
||||
flagk0=65536
|
||||
tflag0=0
|
||||
initx0=0
|
||||
inity0=0
|
||||
minx0=0
|
||||
miny0=0
|
||||
maxx0=0
|
||||
maxy0=0
|
||||
posx0=50
|
||||
posy0=50
|
||||
sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
swapeffect0=0
|
@ -29,3 +29,4 @@ winver0=0
|
||||
maxres0=-1
|
||||
flagk0=0
|
||||
swapeffect0=0
|
||||
registry0=[HKEY_LOCAL_MACHINE\SOFTWARE]\n\n; Road Rash\n\n[HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts]\n[HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts\RoadRash 95]\n""=""\n"Path"="."\n"CheckDialup"=hex:00\n"ChatState"=hex:02\n"MiniDash"=hex:00\n"OpponentList"=hex:01\n
|
||||
|
32
build/exports/Swat 3 (GOG).dxw
Normal file
32
build/exports/Swat 3 (GOG).dxw
Normal file
@ -0,0 +1,32 @@
|
||||
[target]
|
||||
title0=Swat 3 (GOG)
|
||||
path0=D:\Games\SWAT 3 (GOG)\game\swat.exe
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
notes0=
|
||||
registry0=
|
||||
ver0=1
|
||||
coord0=0
|
||||
flag0=136314914
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=138412036
|
||||
flagj0=4224
|
||||
flagk0=65536
|
||||
tflag0=0
|
||||
initx0=0
|
||||
inity0=0
|
||||
minx0=0
|
||||
miny0=0
|
||||
maxx0=0
|
||||
maxy0=0
|
||||
posx0=50
|
||||
posy0=50
|
||||
sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
swapeffect0=0
|
32
build/exports/Swat 3.dxw
Normal file
32
build/exports/Swat 3.dxw
Normal file
@ -0,0 +1,32 @@
|
||||
[target]
|
||||
title0=Swat 3
|
||||
path0=D:\Games\SWAT3\SWAT.EXE
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
notes0=
|
||||
registry0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=136314914
|
||||
flagg0=1209008128
|
||||
flagh0=20
|
||||
flagi0=138412036
|
||||
flagj0=4224
|
||||
flagk0=65536
|
||||
tflag0=0
|
||||
initx0=0
|
||||
inity0=0
|
||||
minx0=0
|
||||
miny0=0
|
||||
maxx0=0
|
||||
maxy0=0
|
||||
posx0=50
|
||||
posy0=50
|
||||
sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
swapeffect0=0
|
@ -989,8 +989,15 @@ fix: proper default values for"Share ddraw and GDI DC" and "Lock/Unlock Pitch Fi
|
||||
|
||||
v2.03.49
|
||||
fix: a few improvements in handling NULL lpDDSSource in Blit/Flip operations
|
||||
optimization: avoid applying palette to primarty surface when emulated
|
||||
add: option to print relative timing to log
|
||||
fix: avoid handling textures at level greater than 0 since this seems to cause application crash
|
||||
fix: restore cursor clipping through WM_SETFOCUS and DefWindowProc when focus is gained
|
||||
fix: "One Must Fall Battlegrounds" keyboard fix - can't SetWindowsHookEx with WH_KEYBOARD and NULL thread
|
||||
fix: "One Must Fall Battlegrounds" keyboard fix - can't SetWindowsHookEx with WH_KEYBOARD and NULL thread
|
||||
|
||||
v2.03.50
|
||||
fix: check for errors that could cause random GDI cursor clipping regions
|
||||
fix: more accurate hooking of ddraw pointers - fixes several DD_GENERIC_ERROR in Win8/10 platforms, makes "SWAT 3" working
|
||||
fix: improvements (not finished) in dinput handling
|
||||
add: the OS version info is traced in the log file
|
||||
fix: added cursor clipping when requested on new main window creation
|
||||
fix: handling of cursor clipping when the window gain/lose focus threough DefWindowProc message handling
|
124
dll/ddproxy.cpp
124
dll/ddproxy.cpp
@ -53,8 +53,14 @@ extern EnumDisplayModes4_Type pEnumDisplayModes4;
|
||||
extern EnumSurfaces1_Type pEnumSurfaces1;
|
||||
extern EnumSurfaces4_Type pEnumSurfaces4;
|
||||
extern FlipToGDISurface_Type pFlipToGDISurface;
|
||||
extern GetCapsD_Type pGetCapsD;
|
||||
extern GetDisplayMode_Type pGetDisplayMode;
|
||||
extern GetCapsD_Type pGetCaps1D;
|
||||
extern GetCapsD_Type pGetCaps2D;
|
||||
extern GetCapsD_Type pGetCaps4D;
|
||||
extern GetCapsD_Type pGetCaps7D;
|
||||
extern GetDisplayMode_Type pGetDisplayMode1;
|
||||
extern GetDisplayMode_Type pGetDisplayMode2;
|
||||
extern GetDisplayMode4_Type pGetDisplayMode4;
|
||||
extern GetDisplayMode4_Type pGetDisplayMode7;
|
||||
extern GetFourCCCodes_Type pGetFourCCCodes;
|
||||
extern GetGDISurface_Type pGetGDISurface;
|
||||
extern GetMonitorFrequency_Type pGetMonitorFrequency;
|
||||
@ -62,9 +68,14 @@ extern GetScanLine_Type pGetScanLine;
|
||||
extern GetVerticalBlankStatus_Type pGetVerticalBlankStatus;
|
||||
extern Initialize_Type pInitialize;
|
||||
extern RestoreDisplayMode_Type pRestoreDisplayMode;
|
||||
extern SetCooperativeLevel_Type pSetCooperativeLevel;
|
||||
extern SetCooperativeLevel_Type pSetCooperativeLevel1;
|
||||
extern SetCooperativeLevel_Type pSetCooperativeLevel2;
|
||||
extern SetCooperativeLevel_Type pSetCooperativeLevel4;
|
||||
extern SetCooperativeLevel_Type pSetCooperativeLevel7;
|
||||
extern SetDisplayMode1_Type pSetDisplayMode1;
|
||||
extern SetDisplayMode2_Type pSetDisplayMode2;
|
||||
extern SetDisplayMode2_Type pSetDisplayMode4;
|
||||
extern SetDisplayMode2_Type pSetDisplayMode7;
|
||||
// missing WaitForVerticalBlank ...
|
||||
// v2 interface
|
||||
extern GetAvailableVidMem_Type pGetAvailableVidMem;
|
||||
@ -940,10 +951,10 @@ HRESULT WINAPI extFlipToGDISurfaceProxy(LPDIRECTDRAW lpdd)
|
||||
return res;
|
||||
}
|
||||
|
||||
HRESULT WINAPI extGetDisplayModeProxy(LPDIRECTDRAW lpdd, LPDDSURFACEDESC lpddsd)
|
||||
HRESULT WINAPI extGetDisplayModeProxy(GetDisplayMode_Type pGetDisplayMode, LPDIRECTDRAW lpdd, LPDDSURFACEDESC lpddsd)
|
||||
{
|
||||
HRESULT res;
|
||||
OutTraceP("GetDisplayMode(D): PROXED lpdd=%x\n");
|
||||
OutTraceP("GetDisplayMode(D): PROXED lpdd=%x lpddsd=%x\n", lpdd, lpddsd);
|
||||
res=(*pGetDisplayMode)(lpdd, lpddsd);
|
||||
if(res) OutTraceP("GetDisplayMode(D): ERROR res=%x(%s)\n", res, ExplainDDError(res));
|
||||
else{
|
||||
@ -958,6 +969,27 @@ HRESULT WINAPI extGetDisplayModeProxy(LPDIRECTDRAW lpdd, LPDDSURFACEDESC lpddsd)
|
||||
return res;
|
||||
}
|
||||
|
||||
HRESULT WINAPI extGetDisplayMode1Proxy(LPDIRECTDRAW lpdd, LPDDSURFACEDESC lpddsd)
|
||||
{
|
||||
return extGetDisplayModeProxy(pGetDisplayMode1, lpdd, lpddsd);
|
||||
}
|
||||
|
||||
HRESULT WINAPI extGetDisplayMode2Proxy(LPDIRECTDRAW lpdd, LPDDSURFACEDESC lpddsd)
|
||||
{
|
||||
return extGetDisplayModeProxy(pGetDisplayMode2, lpdd, lpddsd);
|
||||
}
|
||||
|
||||
HRESULT WINAPI extGetDisplayMode4Proxy(LPDIRECTDRAW lpdd, LPDDSURFACEDESC2 lpddsd)
|
||||
{
|
||||
return extGetDisplayModeProxy((GetDisplayMode_Type)pGetDisplayMode4, lpdd, (LPDDSURFACEDESC)lpddsd);
|
||||
}
|
||||
|
||||
HRESULT WINAPI extGetDisplayMode7Proxy(LPDIRECTDRAW lpdd, LPDDSURFACEDESC lpddsd)
|
||||
{
|
||||
return extGetDisplayModeProxy((GetDisplayMode_Type)pGetDisplayMode7, lpdd, (LPDDSURFACEDESC)lpddsd);
|
||||
}
|
||||
|
||||
|
||||
HRESULT WINAPI extGetGDISurfaceProxy(LPDIRECTDRAW lpdd, LPDIRECTDRAWSURFACE *w)
|
||||
{
|
||||
int res;
|
||||
@ -973,30 +1005,50 @@ HRESULT WINAPI extSetCooperativeLevelProxy(void *lpdd, HWND hwnd, DWORD dwflags)
|
||||
HRESULT res;
|
||||
OutTraceP("SetCooperativeLevel(D): PROXED lpdd=%x hwnd=%x dwFlags=%x(%s)\n",
|
||||
lpdd, hwnd, dwflags,ExplainCoopFlags(dwflags));
|
||||
res=(*pSetCooperativeLevel)(lpdd, hwnd, dwflags);
|
||||
res=(*pSetCooperativeLevel1)(lpdd, hwnd, dwflags);
|
||||
if (res) OutTraceP("SetCooperativeLevel(D): ERROR res=%x(%s)\n", res, ExplainDDError(res));
|
||||
return res;
|
||||
}
|
||||
|
||||
HRESULT WINAPI extSetDisplayMode2Proxy(LPDIRECTDRAW lpdd,
|
||||
DWORD dwwidth, DWORD dwheight, DWORD dwbpp, DWORD dwrefreshrate, DWORD dwflags)
|
||||
static HRESULT WINAPI extSetDisplayModeProxy(int dxversion, LPDIRECTDRAW lpdd,
|
||||
DWORD dwwidth, DWORD dwheight, DWORD dwbpp, DWORD dwRefreshRate, DWORD dwflags)
|
||||
{
|
||||
HRESULT res;
|
||||
OutTraceP("SetDisplayMode(2): PROXED lpdd=%x WxH=(%dx%d) bpp=%d refresh=%x dwFlags=%x\n",
|
||||
lpdd, dwwidth, dwheight, dwbpp, dwrefreshrate, dwflags);
|
||||
res=(pSetDisplayMode2)(lpdd, dwwidth, dwheight, dwbpp, dwrefreshrate, dwflags);
|
||||
if (res) OutTraceP("SetDisplayMode(2): ERROR res=%x(%s)\n", res, ExplainDDError(res));
|
||||
char sExtra[81];
|
||||
if(IsTraceP){
|
||||
if(dxversion>1) sprintf(sExtra, " refresh=%x dwFlags=%x", dwRefreshRate, dwflags);
|
||||
OutTraceP("SetDisplayMode(%d): PROXED lpdd=%x WxH=(%dx%d) bpp=%d%s\n",
|
||||
lpdd, dwwidth, dwheight, dwbpp, (dxversion>1)?sExtra : "");
|
||||
}
|
||||
switch(dxversion){
|
||||
default:
|
||||
case 1: res=(*pSetDisplayMode1)(lpdd, dwwidth, dwheight, dwbpp); break;
|
||||
case 2: res=(*pSetDisplayMode2)(lpdd, dwwidth, dwheight, dwbpp, dwRefreshRate, dwflags); break;
|
||||
case 4: res=(*pSetDisplayMode4)(lpdd, dwwidth, dwheight, dwbpp, dwRefreshRate, dwflags); break;
|
||||
case 7: res=(*pSetDisplayMode7)(lpdd, dwwidth, dwheight, dwbpp, dwRefreshRate, dwflags); break;
|
||||
}
|
||||
if (res) OutTraceP("SetDisplayMode(%d): ERROR res=%x(%s)\n", dxversion, res, ExplainDDError(res));
|
||||
return res;
|
||||
}
|
||||
|
||||
HRESULT WINAPI extSetDisplayMode1Proxy(LPDIRECTDRAW lpdd,
|
||||
DWORD dwwidth, DWORD dwheight, DWORD dwbpp)
|
||||
HRESULT WINAPI extSetDisplayMode1Proxy(LPDIRECTDRAW lpdd, DWORD dwwidth, DWORD dwheight, DWORD dwbpp)
|
||||
{
|
||||
HRESULT res;
|
||||
OutTraceP("SetDisplayMode(1): PROXED lpdd=%x WxH=(%dx%d) bpp=%d\n", lpdd, dwwidth, dwheight, dwbpp);
|
||||
res=(pSetDisplayMode1)(lpdd, dwwidth, dwheight, dwbpp);
|
||||
if (res) OutTraceP("SetDisplayMode(1): ERROR res=%x(%s)\n", res, ExplainDDError(res));
|
||||
return res;
|
||||
return extSetDisplayModeProxy(1, lpdd, dwwidth, dwheight, dwbpp, 0, 0);
|
||||
}
|
||||
|
||||
HRESULT WINAPI extSetDisplayMode2Proxy(LPDIRECTDRAW lpdd, DWORD dwwidth, DWORD dwheight, DWORD dwbpp, DWORD dwrefreshrate, DWORD dwflags)
|
||||
{
|
||||
return extSetDisplayModeProxy(2, lpdd, dwwidth, dwheight, dwbpp, dwrefreshrate, dwflags);
|
||||
}
|
||||
|
||||
HRESULT WINAPI extSetDisplayMode4Proxy(LPDIRECTDRAW lpdd, DWORD dwwidth, DWORD dwheight, DWORD dwbpp, DWORD dwrefreshrate, DWORD dwflags)
|
||||
{
|
||||
return extSetDisplayModeProxy(4, lpdd, dwwidth, dwheight, dwbpp, dwrefreshrate, dwflags);
|
||||
}
|
||||
|
||||
HRESULT WINAPI extSetDisplayMode7Proxy(LPDIRECTDRAW lpdd, DWORD dwwidth, DWORD dwheight, DWORD dwbpp, DWORD dwrefreshrate, DWORD dwflags)
|
||||
{
|
||||
return extSetDisplayModeProxy(7, lpdd, dwwidth, dwheight, dwbpp, dwrefreshrate, dwflags);
|
||||
}
|
||||
|
||||
HRESULT WINAPI extTestCooperativeLevelProxy(LPDIRECTDRAW lpdd)
|
||||
@ -1743,9 +1795,30 @@ static void HookDDSessionProxy(LPDIRECTDRAW *lplpdd, int dxVersion)
|
||||
// IDIrectDraw::FlipToGDISurface
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 40), extFlipToGDISurfaceProxy, (void **)&pFlipToGDISurface, "FlipToGDISurface(D)");
|
||||
// IDIrectDraw::GetCaps
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 44), extGetCapsD, (void **)&pGetCapsD, "GetCaps(D)");
|
||||
// IDIrectDraw::GetDisplayMode
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 48), extGetDisplayModeProxy, (void **)&pGetDisplayMode, "GetDisplayMode(D)");
|
||||
// IDIrectDraw::SetDisplayMode
|
||||
switch(dxVersion) {
|
||||
case 1:
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 44), extGetCaps1D, (void **)&pGetCaps1D, "GetCaps(D1)");
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 48), extGetDisplayMode1Proxy, (void **)&pGetDisplayMode1, "GetDisplayMode(D1)");
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 84), extSetDisplayMode1Proxy, (void **)&pSetDisplayMode1, "SetDisplayMode(D1)");
|
||||
break;
|
||||
case 2:
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 44), extGetCaps2D, (void **)&pGetCaps2D, "GetCaps(D2)");
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 48), extGetDisplayMode2Proxy, (void **)&pGetDisplayMode2, "GetDisplayMode(D2)");
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 84), extSetDisplayMode2Proxy, (void **)&pSetDisplayMode2, "SetDisplayMode(D2)");
|
||||
break;
|
||||
case 4:
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 44), extGetCaps4D, (void **)&pGetCaps4D, "GetCaps(D4)");
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 48), extGetDisplayMode4Proxy, (void **)&pGetDisplayMode4, "GetDisplayMode(D4)");
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 84), extSetDisplayMode4Proxy, (void **)&pSetDisplayMode4, "SetDisplayMode(D4)");
|
||||
break;
|
||||
case 7:
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 44), extGetCaps7D, (void **)&pGetCaps7D, "GetCaps(D7)");
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 48), extGetDisplayMode7Proxy, (void **)&pGetDisplayMode7, "GetDisplayMode(D7)");
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 84), extSetDisplayMode7Proxy, (void **)&pSetDisplayMode7, "SetDisplayMode(D7)");
|
||||
break;
|
||||
}
|
||||
// IDIrectDraw::GetFourCCCodes
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 52), extGetFourCCCodesProxy, (void **)&pGetFourCCCodes, "GetFourCCCodes(D)");
|
||||
// IDIrectDraw::GetGDISurface
|
||||
@ -1773,14 +1846,7 @@ static void HookDDSessionProxy(LPDIRECTDRAW *lplpdd, int dxVersion)
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 108), extGetDeviceIdentifierProxy, (void **)&pGetDeviceIdentifier, "GetDeviceIdentifier(D)");
|
||||
}
|
||||
// IDIrectDraw::SetCooperativeLevel
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 80), extSetCooperativeLevelProxy, (void **)&pSetCooperativeLevel, "SetCooperativeLevel(D)");
|
||||
// IDIrectDraw::SetDisplayMode
|
||||
if (dxVersion > 1){
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 84), extSetDisplayMode2Proxy, (void **)&pSetDisplayMode2, "SetDisplayMode(D2)");
|
||||
}
|
||||
else {
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 84), extSetDisplayMode1Proxy, (void **)&pSetDisplayMode1, "SetDisplayMode(D1)");
|
||||
}
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 80), extSetCooperativeLevelProxy, (void **)&pSetCooperativeLevel1, "SetCooperativeLevel(D)");
|
||||
#if 0
|
||||
// IDIrectDraw::WaitForVerticalBlank
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 88), extWaitForVerticalBlankProxy, (void **)&pWaitForVerticalBlank, "WaitForVerticalBlank(D)");
|
||||
|
@ -60,7 +60,10 @@ extern HRESULT WINAPI extGetSurfaceDesc4Proxy(LPDIRECTDRAWSURFACE2, LPDDSURFACED
|
||||
extern ULONG WINAPI extAddRefDProxy(LPDIRECTDRAW);
|
||||
extern ULONG WINAPI extCompactProxy(LPDIRECTDRAW);
|
||||
extern HRESULT WINAPI extEnumDisplayModesProxy(LPDIRECTDRAW, DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK);
|
||||
extern HRESULT WINAPI extGetCapsD(LPDIRECTDRAW, LPDDCAPS, LPDDCAPS);
|
||||
extern HRESULT WINAPI extGetCaps1D(LPDIRECTDRAW, LPDDCAPS, LPDDCAPS);
|
||||
extern HRESULT WINAPI extGetCaps2D(LPDIRECTDRAW, LPDDCAPS, LPDDCAPS);
|
||||
extern HRESULT WINAPI extGetCaps4D(LPDIRECTDRAW, LPDDCAPS, LPDDCAPS);
|
||||
extern HRESULT WINAPI extGetCaps7D(LPDIRECTDRAW, LPDDCAPS, LPDDCAPS);
|
||||
extern HRESULT WINAPI extGetFourCCCodesProxy(LPDIRECTDRAW, LPDWORD, LPDWORD);
|
||||
extern HRESULT WINAPI extGetMonitorFrequencyProxy(LPDIRECTDRAW, LPDWORD);
|
||||
extern HRESULT WINAPI extGetScanLineProxy(LPDIRECTDRAW, LPDWORD);
|
||||
|
255
dll/ddraw.cpp
255
dll/ddraw.cpp
@ -46,14 +46,22 @@ HRESULT WINAPI extCreateSurface4(LPDIRECTDRAW, DDSURFACEDESC2 *, LPDIRECTDRAWSUR
|
||||
HRESULT WINAPI extCreateSurface7(LPDIRECTDRAW, DDSURFACEDESC2 *, LPDIRECTDRAWSURFACE *, void *);
|
||||
HRESULT WINAPI extDuplicateSurface(LPDIRECTDRAW, LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE *);
|
||||
HRESULT WINAPI extFlipToGDISurface(LPDIRECTDRAW);
|
||||
HRESULT WINAPI extGetDisplayMode(LPDIRECTDRAW, LPDDSURFACEDESC);
|
||||
HRESULT WINAPI extGetDisplayMode1(LPDIRECTDRAW, LPDDSURFACEDESC);
|
||||
HRESULT WINAPI extGetDisplayMode2(LPDIRECTDRAW, LPDDSURFACEDESC);
|
||||
HRESULT WINAPI extGetDisplayMode4(LPDIRECTDRAW, LPDDSURFACEDESC2);
|
||||
HRESULT WINAPI extGetDisplayMode7(LPDIRECTDRAW, LPDDSURFACEDESC2);
|
||||
HRESULT WINAPI extGetGDISurface(LPDIRECTDRAW, LPDIRECTDRAWSURFACE *);
|
||||
HRESULT WINAPI extEnumDisplayModes1(LPDIRECTDRAW, DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK);
|
||||
HRESULT WINAPI extEnumDisplayModes4(LPDIRECTDRAW, DWORD, LPDDSURFACEDESC2, LPVOID, LPDDENUMMODESCALLBACK2);
|
||||
HRESULT WINAPI extInitialize(LPDIRECTDRAW, FAR GUID *);
|
||||
HRESULT WINAPI extSetCooperativeLevel(void *, HWND, DWORD);
|
||||
HRESULT WINAPI extSetCooperativeLevel1(LPDIRECTDRAW, HWND, DWORD);
|
||||
HRESULT WINAPI extSetCooperativeLevel2(LPDIRECTDRAW, HWND, DWORD);
|
||||
HRESULT WINAPI extSetCooperativeLevel4(LPDIRECTDRAW, HWND, DWORD);
|
||||
HRESULT WINAPI extSetCooperativeLevel7(LPDIRECTDRAW, HWND, DWORD);
|
||||
HRESULT WINAPI extSetDisplayMode1(LPDIRECTDRAW, DWORD, DWORD, DWORD);
|
||||
HRESULT WINAPI extSetDisplayMode2(LPDIRECTDRAW, DWORD, DWORD, DWORD, DWORD, DWORD);
|
||||
HRESULT WINAPI extSetDisplayMode4(LPDIRECTDRAW, DWORD, DWORD, DWORD, DWORD, DWORD);
|
||||
HRESULT WINAPI extSetDisplayMode7(LPDIRECTDRAW, DWORD, DWORD, DWORD, DWORD, DWORD);
|
||||
HRESULT WINAPI extWaitForVerticalBlank(LPDIRECTDRAW, DWORD, HANDLE);
|
||||
/*** Added in the V2 Interface ***/
|
||||
HRESULT WINAPI extGetAvailableVidMem2(LPDIRECTDRAW, LPDDSCAPS, LPDWORD, LPDWORD);
|
||||
@ -62,7 +70,10 @@ HRESULT WINAPI extGetAvailableVidMem4(LPDIRECTDRAW, LPDDSCAPS, LPDWORD, LPDWORD)
|
||||
HRESULT WINAPI extTestCooperativeLevel(LPDIRECTDRAW);
|
||||
// STDMETHOD(StartModeTest)(THIS_ LPSIZE, DWORD, DWORD ) PURE;
|
||||
// STDMETHOD(EvaluateMode)(THIS_ DWORD, DWORD * ) PURE;
|
||||
HRESULT WINAPI extGetCapsD(LPDIRECTDRAW, LPDDCAPS, LPDDCAPS);
|
||||
HRESULT WINAPI extGetCaps1D(LPDIRECTDRAW, LPDDCAPS, LPDDCAPS);
|
||||
HRESULT WINAPI extGetCaps2D(LPDIRECTDRAW, LPDDCAPS, LPDDCAPS);
|
||||
HRESULT WINAPI extGetCaps4D(LPDIRECTDRAW, LPDDCAPS, LPDDCAPS);
|
||||
HRESULT WINAPI extGetCaps7D(LPDIRECTDRAW, LPDDCAPS, LPDDCAPS);
|
||||
|
||||
// DirectDrawSurface
|
||||
HRESULT WINAPI extQueryInterfaceS(void *, REFIID, LPVOID *);
|
||||
@ -149,8 +160,14 @@ EnumDisplayModes4_Type pEnumDisplayModes4;
|
||||
EnumSurfaces1_Type pEnumSurfaces1;
|
||||
EnumSurfaces4_Type pEnumSurfaces4;
|
||||
FlipToGDISurface_Type pFlipToGDISurface;
|
||||
GetCapsD_Type pGetCapsD;
|
||||
GetDisplayMode_Type pGetDisplayMode;
|
||||
GetCapsD_Type pGetCaps1D;
|
||||
GetCapsD_Type pGetCaps2D;
|
||||
GetCapsD_Type pGetCaps4D;
|
||||
GetCapsD_Type pGetCaps7D;
|
||||
GetDisplayMode_Type pGetDisplayMode1;
|
||||
GetDisplayMode_Type pGetDisplayMode2;
|
||||
GetDisplayMode4_Type pGetDisplayMode4;
|
||||
GetDisplayMode4_Type pGetDisplayMode7;
|
||||
GetFourCCCodes_Type pGetFourCCCodes;
|
||||
GetGDISurface_Type pGetGDISurface;
|
||||
GetMonitorFrequency_Type pGetMonitorFrequency;
|
||||
@ -158,9 +175,14 @@ GetScanLine_Type pGetScanLine;
|
||||
GetVerticalBlankStatus_Type pGetVerticalBlankStatus;
|
||||
Initialize_Type pInitialize;
|
||||
RestoreDisplayMode_Type pRestoreDisplayMode;
|
||||
SetCooperativeLevel_Type pSetCooperativeLevel;
|
||||
SetCooperativeLevel_Type pSetCooperativeLevel1;
|
||||
SetCooperativeLevel_Type pSetCooperativeLevel2;
|
||||
SetCooperativeLevel_Type pSetCooperativeLevel4;
|
||||
SetCooperativeLevel_Type pSetCooperativeLevel7;
|
||||
SetDisplayMode1_Type pSetDisplayMode1;
|
||||
SetDisplayMode2_Type pSetDisplayMode2;
|
||||
SetDisplayMode2_Type pSetDisplayMode4;
|
||||
SetDisplayMode2_Type pSetDisplayMode7;
|
||||
WaitForVerticalBlank_Type pWaitForVerticalBlank;
|
||||
GetSurfaceFromDC_Type pGetSurfaceFromDC;
|
||||
GetAvailableVidMem_Type pGetAvailableVidMem;
|
||||
@ -298,6 +320,20 @@ DWORD gdwRefreshRate;
|
||||
#define MAXREFRESHDELAYCOUNT 20
|
||||
int iRefreshDelays[MAXREFRESHDELAYCOUNT]={16, 17};
|
||||
int iRefreshDelayCount=2;
|
||||
int lpddHookedVersion(LPDIRECTDRAW);
|
||||
|
||||
static HRESULT myGetDisplayMode(LPDIRECTDRAW lpdd, LPDDSURFACEDESC lpdds)
|
||||
{
|
||||
HRESULT res;
|
||||
switch(lpddHookedVersion(lpdd)){
|
||||
case 1: res=(*pGetDisplayMode1)(lpdd, lpdds); break;
|
||||
case 2: res=(*pGetDisplayMode2)(lpdd, lpdds); break;
|
||||
case 4: res=(*pGetDisplayMode4)(lpdd, (LPDDSURFACEDESC2)lpdds); break;
|
||||
case 7: res=(*pGetDisplayMode7)(lpdd, (LPDDSURFACEDESC2)lpdds); break;
|
||||
default: res=(*pGetDisplayMode1)(lpdd, lpdds); break;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
void SetVSyncDelays(LPDIRECTDRAW lpdd)
|
||||
{
|
||||
@ -306,11 +342,7 @@ void SetVSyncDelays(LPDIRECTDRAW lpdd)
|
||||
|
||||
memset(&ddsdRefreshRate, 0, sizeof(ddsdRefreshRate));
|
||||
ddsdRefreshRate.dwSize = sizeof(DDSURFACEDESC);
|
||||
res=(*pGetDisplayMode)(lpdd, (LPDDSURFACEDESC)&ddsdRefreshRate);
|
||||
if(res==DDERR_GENERIC){ // handling Win8 missing support for old ddraw interface
|
||||
ddsdRefreshRate.dwSize = sizeof(DDSURFACEDESC2);
|
||||
res=(*pGetDisplayMode)(lpdd, (LPDDSURFACEDESC)&ddsdRefreshRate);
|
||||
}
|
||||
res=myGetDisplayMode(lpdd, (LPDDSURFACEDESC)&ddsdRefreshRate);
|
||||
if(res) return;
|
||||
dxw.SetVSyncDelays(ddsdRefreshRate.dwRefreshRate);
|
||||
}
|
||||
@ -490,11 +522,7 @@ void InitDDScreenParameters(LPDIRECTDRAW lpdd)
|
||||
HRESULT res;
|
||||
DDSURFACEDESC2 ddsd;
|
||||
ddsd.dwSize=sizeof(DDSURFACEDESC);
|
||||
res=(*pGetDisplayMode)(lpdd, (LPDDSURFACEDESC)&ddsd);
|
||||
if(res==DDERR_GENERIC){ // Win8 missing support for old ddraw interfaces
|
||||
ddsd.dwSize=sizeof(DDSURFACEDESC2);
|
||||
res=(*pGetDisplayMode)(lpdd, (LPDDSURFACEDESC)&ddsd);
|
||||
}
|
||||
res=myGetDisplayMode(lpdd, (LPDDSURFACEDESC)&ddsd);
|
||||
if(res){
|
||||
OutTraceE("GetDisplayMode: ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return;
|
||||
@ -1027,20 +1055,39 @@ void HookDDSession(LPDIRECTDRAW *lplpdd, int dxversion)
|
||||
// IDIrectDraw::FlipToGDISurface
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 40), extFlipToGDISurface, (void **)&pFlipToGDISurface, "FlipToGDISurface(D)");
|
||||
// IDIrectDraw::GetCaps
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 44), extGetCapsD, (void **)&pGetCapsD, "GetCaps(D)");
|
||||
// IDIrectDraw::SetCooperativeLevel
|
||||
// IDIrectDraw::GetDisplayMode
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 48), extGetDisplayMode, (void **)&pGetDisplayMode, "GetDisplayMode(D)");
|
||||
// IDIrectDraw::SetDisplayMode
|
||||
switch(dxversion) {
|
||||
case 1:
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 44), extGetCaps1D, (void **)&pGetCaps1D, "GetCaps(D1)");
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 48), extGetDisplayMode1, (void **)&pGetDisplayMode1, "GetDisplayMode(D1)");
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 80), extSetCooperativeLevel1, (void **)&pSetCooperativeLevel1, "SetCooperativeLevel(D1)");
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 84), extSetDisplayMode1, (void **)&pSetDisplayMode1, "SetDisplayMode(D1)");
|
||||
break;
|
||||
case 2:
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 44), extGetCaps2D, (void **)&pGetCaps2D, "GetCaps(D2)");
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 48), extGetDisplayMode2, (void **)&pGetDisplayMode2, "GetDisplayMode(D2)");
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 80), extSetCooperativeLevel2, (void **)&pSetCooperativeLevel2, "SetCooperativeLevel(D2)");
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 84), extSetDisplayMode2, (void **)&pSetDisplayMode2, "SetDisplayMode(D2)");
|
||||
break;
|
||||
case 4:
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 44), extGetCaps4D, (void **)&pGetCaps4D, "GetCaps(D4)");
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 48), extGetDisplayMode4, (void **)&pGetDisplayMode4, "GetDisplayMode(D4)");
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 80), extSetCooperativeLevel4, (void **)&pSetCooperativeLevel4, "SetCooperativeLevel(D4)");
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 84), extSetDisplayMode4, (void **)&pSetDisplayMode4, "SetDisplayMode(D4)");
|
||||
break;
|
||||
case 7:
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 44), extGetCaps7D, (void **)&pGetCaps7D, "GetCaps(D7)");
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 48), extGetDisplayMode7, (void **)&pGetDisplayMode7, "GetDisplayMode(D7)");
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 80), extSetCooperativeLevel7, (void **)&pSetCooperativeLevel7, "SetCooperativeLevel(D7)");
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 84), extSetDisplayMode7, (void **)&pSetDisplayMode7, "SetDisplayMode(D7)");
|
||||
break;
|
||||
}
|
||||
// IDIrectDraw::GetGDISurface
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 56), extGetGDISurface, (void **)&pGetGDISurface, "GetGDISurface(D)");
|
||||
// IDIrectDraw::Initialize
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 72), extInitialize, (void **)&pInitialize, "Initialize(D)");
|
||||
// IDIrectDraw::SetCooperativeLevel
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 80), extSetCooperativeLevel, (void **)&pSetCooperativeLevel, "SetCooperativeLevel(D)");
|
||||
// IDIrectDraw::SetDisplayMode
|
||||
if (dxversion > 1)
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 84), extSetDisplayMode2, (void **)&pSetDisplayMode2, "SetDisplayMode(D2)");
|
||||
else
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 84), extSetDisplayMode1, (void **)&pSetDisplayMode1, "SetDisplayMode(D1)");
|
||||
// IDIrectDraw::WaitForVerticalBlank
|
||||
SetHook((void *)(**(DWORD **)lplpdd + 88), extWaitForVerticalBlank, (void **)&pWaitForVerticalBlank, "WaitForVerticalBlank(D)");
|
||||
// IDIrectDraw::GetAvailableVidMem
|
||||
@ -1525,7 +1572,7 @@ static void HandleCapsD(char *sLabel, LPDDCAPS c)
|
||||
OutTraceDDRAW("GetCaps(%s): FIXED VidMemTotal=%x VidMemFree=%x\n", sLabel, c->dwVidMemTotal, c->dwVidMemFree);
|
||||
}
|
||||
|
||||
HRESULT WINAPI extGetCapsD(LPDIRECTDRAW lpdd, LPDDCAPS c1, LPDDCAPS c2)
|
||||
HRESULT WINAPI extGetCapsD(int dxversion, GetCapsD_Type pGetCapsD, LPDIRECTDRAW lpdd, LPDDCAPS c1, LPDDCAPS c2)
|
||||
{
|
||||
HRESULT res;
|
||||
OutTraceDDRAW("GetCaps(D): lpdd=%x %s %s\n", lpdd, c1?"c1":"NULL", c2?"c2":"NULL");
|
||||
@ -1563,6 +1610,23 @@ HRESULT WINAPI extGetCapsD(LPDIRECTDRAW lpdd, LPDDCAPS c1, LPDDCAPS c2)
|
||||
return res;
|
||||
}
|
||||
|
||||
HRESULT WINAPI extGetCaps1D(LPDIRECTDRAW lpdd, LPDDCAPS c1, LPDDCAPS c2)
|
||||
{
|
||||
return extGetCapsD(1, pGetCaps1D, lpdd, c1, c2);
|
||||
}
|
||||
HRESULT WINAPI extGetCaps2D(LPDIRECTDRAW lpdd, LPDDCAPS c1, LPDDCAPS c2)
|
||||
{
|
||||
return extGetCapsD(2, pGetCaps2D, lpdd, c1, c2);
|
||||
}
|
||||
HRESULT WINAPI extGetCaps4D(LPDIRECTDRAW lpdd, LPDDCAPS c1, LPDDCAPS c2)
|
||||
{
|
||||
return extGetCapsD(4, pGetCaps4D, lpdd, c1, c2);
|
||||
}
|
||||
HRESULT WINAPI extGetCaps7D(LPDIRECTDRAW lpdd, LPDDCAPS_DX7 c1, LPDDCAPS_DX7 c2)
|
||||
{
|
||||
return extGetCapsD(7, pGetCaps7D, lpdd, (LPDDCAPS)c1, (LPDDCAPS)c2);
|
||||
}
|
||||
|
||||
HRESULT WINAPI extDirectDrawCreate(GUID FAR *lpguid, LPDIRECTDRAW FAR *lplpdd, IUnknown FAR *pu)
|
||||
{
|
||||
HRESULT res;
|
||||
@ -1997,12 +2061,16 @@ HRESULT WINAPI extSetDisplayMode(int version, LPDIRECTDRAW lpdd,
|
||||
ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT | DDSD_REFRESHRATE;
|
||||
ddsd.ddpfPixelFormat.dwSize = sizeof(DDPIXELFORMAT);
|
||||
ddsd.ddpfPixelFormat.dwFlags = DDPF_RGB;
|
||||
res=(*pGetDisplayMode)(lpdd, (LPDDSURFACEDESC)&ddsd);
|
||||
if(res==DDERR_GENERIC){ // handling Win8 missing support for old ddraw interface
|
||||
ddsd.dwSize = sizeof(DDSURFACEDESC2);
|
||||
res=(*pGetDisplayMode)(lpdd, (LPDDSURFACEDESC)&ddsd);
|
||||
switch(version){
|
||||
default:
|
||||
case 1: res=(*pGetDisplayMode1)(lpdd, (LPDDSURFACEDESC)&ddsd); break;
|
||||
case 2: res=(*pGetDisplayMode2)(lpdd, (LPDDSURFACEDESC)&ddsd); break;
|
||||
case 4: res=(*pGetDisplayMode4)(lpdd, &ddsd); break;
|
||||
case 7: res=(*pGetDisplayMode7)(lpdd, &ddsd); break;
|
||||
}
|
||||
|
||||
|
||||
OutTraceB("SetDisplayMode: detected screen size=(%dx%d)\n", ddsd.dwWidth, ddsd.dwHeight);
|
||||
|
||||
if(dxw.Windowize){
|
||||
if(!IsChangeDisplaySettingsHotPatched){
|
||||
dwwidth = ddsd.dwWidth;
|
||||
@ -2016,11 +2084,13 @@ HRESULT WINAPI extSetDisplayMode(int version, LPDIRECTDRAW lpdd,
|
||||
dwbpp = ddsd.ddpfPixelFormat.dwRGBBitCount;
|
||||
}
|
||||
|
||||
if (version==1)
|
||||
res = (*pSetDisplayMode1)(lpdd, dwwidth, dwheight, dwbpp);
|
||||
else
|
||||
res = (*pSetDisplayMode2)(lpdd, dwwidth, dwheight, dwbpp, ddsd.dwRefreshRate, 0);
|
||||
|
||||
switch(version){
|
||||
default:
|
||||
case 1: res=(*pSetDisplayMode1)(lpdd, dwwidth, dwheight, dwbpp); break;
|
||||
case 2: res=(*pSetDisplayMode2)(lpdd, dwwidth, dwheight, dwbpp, ddsd.dwRefreshRate, 0); break;
|
||||
case 4: res=(*pSetDisplayMode4)(lpdd, dwwidth, dwheight, dwbpp, ddsd.dwRefreshRate, 0); break;
|
||||
case 7: res=(*pSetDisplayMode7)(lpdd, dwwidth, dwheight, dwbpp, ddsd.dwRefreshRate, 0); break;
|
||||
}
|
||||
if(res) OutTraceE("SetDisplayMode: error=%x\n", res);
|
||||
|
||||
SetVSyncDelays(lpdd);
|
||||
@ -2031,21 +2101,29 @@ HRESULT WINAPI extSetDisplayMode(int version, LPDIRECTDRAW lpdd,
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI extSetDisplayMode2(LPDIRECTDRAW lpdd,
|
||||
DWORD dwwidth, DWORD dwheight, DWORD dwbpp, DWORD dwrefreshrate, DWORD dwflags)
|
||||
{
|
||||
return extSetDisplayMode(2, lpdd, dwwidth, dwheight, dwbpp, dwrefreshrate, dwflags);
|
||||
}
|
||||
|
||||
HRESULT WINAPI extSetDisplayMode1(LPDIRECTDRAW lpdd,
|
||||
DWORD dwwidth, DWORD dwheight, DWORD dwbpp)
|
||||
HRESULT WINAPI extSetDisplayMode1(LPDIRECTDRAW lpdd, DWORD dwwidth, DWORD dwheight, DWORD dwbpp)
|
||||
{
|
||||
return extSetDisplayMode(1, lpdd, dwwidth, dwheight, dwbpp, 0, 0);
|
||||
}
|
||||
|
||||
HRESULT WINAPI extGetDisplayMode(LPDIRECTDRAW lpdd, LPDDSURFACEDESC lpddsd)
|
||||
HRESULT WINAPI extSetDisplayMode2(LPDIRECTDRAW lpdd, DWORD dwwidth, DWORD dwheight, DWORD dwbpp, DWORD dwrefreshrate, DWORD dwflags)
|
||||
{
|
||||
OutTraceDDRAW("GetDisplayMode: lpdd=%x lpddsd=%x\n", lpdd, lpddsd);
|
||||
return extSetDisplayMode(2, lpdd, dwwidth, dwheight, dwbpp, dwrefreshrate, dwflags);
|
||||
}
|
||||
|
||||
HRESULT WINAPI extSetDisplayMode4(LPDIRECTDRAW lpdd, DWORD dwwidth, DWORD dwheight, DWORD dwbpp, DWORD dwrefreshrate, DWORD dwflags)
|
||||
{
|
||||
return extSetDisplayMode(4, lpdd, dwwidth, dwheight, dwbpp, dwrefreshrate, dwflags);
|
||||
}
|
||||
|
||||
HRESULT WINAPI extSetDisplayMode7(LPDIRECTDRAW lpdd, DWORD dwwidth, DWORD dwheight, DWORD dwbpp, DWORD dwrefreshrate, DWORD dwflags)
|
||||
{
|
||||
return extSetDisplayMode(7, lpdd, dwwidth, dwheight, dwbpp, dwrefreshrate, dwflags);
|
||||
}
|
||||
|
||||
HRESULT WINAPI extGetDisplayMode(GetDisplayMode_Type pGetDisplayMode, LPDIRECTDRAW lpdd, LPDDSURFACEDESC lpddsd)
|
||||
{
|
||||
OutTraceDDRAW("GetDisplayMode(D1): lpdd=%x lpddsd=%x\n", lpdd, lpddsd);
|
||||
|
||||
(*pGetDisplayMode)(lpdd, lpddsd);
|
||||
if(dxw.dwFlags1 & EMULATESURFACE) {
|
||||
@ -2075,19 +2153,54 @@ HRESULT WINAPI extGetDisplayMode(LPDIRECTDRAW lpdd, LPDDSURFACEDESC lpddsd)
|
||||
|
||||
OutTraceDDRAW("GetDisplayMode: returning size=(%dx%d) %s\n", lpddsd->dwWidth, lpddsd->dwHeight, DumpPixelFormat((LPDDSURFACEDESC2)lpddsd));
|
||||
|
||||
return 0;
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI extGetDisplayMode1(LPDIRECTDRAW lpdd, LPDDSURFACEDESC lpddsd)
|
||||
{
|
||||
return extGetDisplayMode(pGetDisplayMode1, lpdd, lpddsd);
|
||||
}
|
||||
|
||||
HRESULT WINAPI extSetCooperativeLevel(void *lpdd, HWND hwnd, DWORD dwflags)
|
||||
HRESULT WINAPI extGetDisplayMode2(LPDIRECTDRAW lpdd, LPDDSURFACEDESC lpddsd)
|
||||
{
|
||||
return extGetDisplayMode(pGetDisplayMode2, lpdd, lpddsd);
|
||||
}
|
||||
|
||||
HRESULT WINAPI extGetDisplayMode4(LPDIRECTDRAW lpdd, LPDDSURFACEDESC2 lpddsd)
|
||||
{
|
||||
return extGetDisplayMode((GetDisplayMode_Type)pGetDisplayMode4, lpdd, (LPDDSURFACEDESC)lpddsd);
|
||||
}
|
||||
|
||||
HRESULT WINAPI extGetDisplayMode7(LPDIRECTDRAW lpdd, LPDDSURFACEDESC2 lpddsd)
|
||||
{
|
||||
return extGetDisplayMode((GetDisplayMode_Type)pGetDisplayMode7, lpdd, (LPDDSURFACEDESC)lpddsd);
|
||||
}
|
||||
|
||||
HRESULT WINAPI extSetCooperativeLevel(int dxversion, SetCooperativeLevel_Type pSetCooperativeLevel, LPDIRECTDRAW lpdd, HWND hwnd, DWORD dwflags)
|
||||
{
|
||||
HRESULT res;
|
||||
BOOL bFixFrame = FALSE;
|
||||
|
||||
OutTraceDDRAW("SetCooperativeLevel: lpdd=%x hwnd=%x dwFlags=%x(%s)\n",
|
||||
lpdd, hwnd, dwflags,ExplainCoopFlags(dwflags));
|
||||
OutTraceDDRAW("SetCooperativeLevel(D%d): lpdd=%x hwnd=%x dwFlags=%x(%s)\n",
|
||||
dxversion, lpdd, hwnd, dwflags,ExplainCoopFlags(dwflags));
|
||||
|
||||
InitDDScreenParameters((LPDIRECTDRAW)lpdd);
|
||||
DDSURFACEDESC2 ddsd;
|
||||
switch(dxversion){
|
||||
default:
|
||||
case 1: ddsd.dwSize=sizeof(DDSURFACEDESC); res=(*pGetDisplayMode1)(lpdd, (LPDDSURFACEDESC)&ddsd); break;
|
||||
case 2: ddsd.dwSize=sizeof(DDSURFACEDESC); res=(*pGetDisplayMode2)(lpdd, (LPDDSURFACEDESC)&ddsd); break;
|
||||
case 4: ddsd.dwSize=sizeof(DDSURFACEDESC2); res=(*pGetDisplayMode4)(lpdd, &ddsd); break;
|
||||
case 7: ddsd.dwSize=sizeof(DDSURFACEDESC2); res=(*pGetDisplayMode7)(lpdd, &ddsd); break;
|
||||
}
|
||||
if(res){
|
||||
OutTraceE("SetCooperativeLevel: GetDisplayMode ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
|
||||
OutTraceDW("InitDDScreenParameters: Actual size=(%dx%d)%s\n", ddsd.dwWidth, ddsd.dwHeight, DumpPixelFormat((LPDDSURFACEDESC2)&ddsd));
|
||||
dxw.ActualPixelFormat=ddsd.ddpfPixelFormat;
|
||||
if(dxw.VirtualPixelFormat.dwRGBBitCount==0) dxw.VirtualPixelFormat=ddsd.ddpfPixelFormat;
|
||||
SetBltTransformations();
|
||||
|
||||
if(dxw.Windowize){
|
||||
if (dwflags & DDSCL_FULLSCREEN){
|
||||
@ -2159,6 +2272,26 @@ HRESULT WINAPI extSetCooperativeLevel(void *lpdd, HWND hwnd, DWORD dwflags)
|
||||
return res;
|
||||
}
|
||||
|
||||
HRESULT WINAPI extSetCooperativeLevel1(LPDIRECTDRAW lpdd, HWND hwnd, DWORD dwflags)
|
||||
{
|
||||
return extSetCooperativeLevel(1, pSetCooperativeLevel1, lpdd, hwnd, dwflags);
|
||||
}
|
||||
|
||||
HRESULT WINAPI extSetCooperativeLevel2(LPDIRECTDRAW lpdd, HWND hwnd, DWORD dwflags)
|
||||
{
|
||||
return extSetCooperativeLevel(2, pSetCooperativeLevel2, lpdd, hwnd, dwflags);
|
||||
}
|
||||
|
||||
HRESULT WINAPI extSetCooperativeLevel4(LPDIRECTDRAW lpdd, HWND hwnd, DWORD dwflags)
|
||||
{
|
||||
return extSetCooperativeLevel(4, pSetCooperativeLevel4, lpdd, hwnd, dwflags);
|
||||
}
|
||||
|
||||
HRESULT WINAPI extSetCooperativeLevel7(LPDIRECTDRAW lpdd, HWND hwnd, DWORD dwflags)
|
||||
{
|
||||
return extSetCooperativeLevel(7, pSetCooperativeLevel7, lpdd, hwnd, dwflags);
|
||||
}
|
||||
|
||||
static void FixSurfaceCaps(LPDDSURFACEDESC2 lpddsd, int dxversion)
|
||||
{
|
||||
// rules of thumb:
|
||||
@ -3845,7 +3978,6 @@ HRESULT WINAPI extSetEntries(LPDIRECTDRAWPALETTE lpddp, DWORD dwflags, DWORD dws
|
||||
if(IsDebug) dxw.DumpPalette(dwcount, &lpentries[dwstart]);
|
||||
|
||||
if((dxw.dwFlags1 & EMULATESURFACE) && (lpDDP == lpddp)){
|
||||
res = DD_OK;
|
||||
OutTraceDW("SetEntries: update PRIMARY palette lpDDP=%x\n", lpddp);
|
||||
if ((dwstart + dwcount > 256) || (dwstart<0)){
|
||||
dwcount=256;
|
||||
@ -3862,11 +3994,12 @@ HRESULT WINAPI extSetEntries(LPDIRECTDRAWPALETTE lpddp, DWORD dwflags, DWORD dws
|
||||
// v2.03.10: do not blit also in case of GDI mode
|
||||
if ((dxw.dwFlags1 & EMULATESURFACE) && !(dxw.dwFlags2 & NOPALETTEUPDATE) && !(dxw.dwFlags5 & GDIMODE)) dxw.ScreenRefresh();
|
||||
}
|
||||
else {
|
||||
res = (*pSetEntries)(lpddp, dwflags, dwstart, dwcount, lpentries);
|
||||
if(res) OutTraceE("SetEntries: ERROR res=%x(%s)\n", res, ExplainDDError(res));
|
||||
else OutTraceDDRAW("SetEntries: OK\n");
|
||||
}
|
||||
|
||||
// this part (setentry against all surfaces, including virtual primary) can be necessary whenever the game uses mixed access to the
|
||||
// screen (like ddraw & GDI) and is necessary on "Road Rash".
|
||||
res = (*pSetEntries)(lpddp, dwflags, dwstart, dwcount, lpentries);
|
||||
if(res) OutTraceE("SetEntries: ERROR res=%x(%s)\n", res, ExplainDDError(res));
|
||||
else OutTraceDDRAW("SetEntries: OK\n");
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -4502,13 +4635,9 @@ HRESULT WINAPI extEnumDisplayModes(EnumDisplayModes1_Type pEnumDisplayModes, LPD
|
||||
DDSURFACEDESC2 EmuDesc;
|
||||
memset(&EmuDesc, 0, sizeof(EmuDesc));
|
||||
EmuDesc.dwSize = sizeof(DDSURFACEDESC); // using release 1 type ....
|
||||
res=(*pGetDisplayMode)(lpdd, (LPDDSURFACEDESC)&EmuDesc);
|
||||
if(res==DDERR_GENERIC){ // Win8 missing support for old ddraw interface
|
||||
EmuDesc.dwSize = sizeof(DDSURFACEDESC2); // using release 2 type ....
|
||||
res=(*pGetDisplayMode)(lpdd, (LPDDSURFACEDESC)&EmuDesc);
|
||||
}
|
||||
res=myGetDisplayMode(lpdd, (LPDDSURFACEDESC)&EmuDesc);
|
||||
if(res){
|
||||
OutTraceE("GetDisplayMode(D): ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
OutTraceE("EnumDisplayModes(D): GetDisplayMode ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
NewContext_Type NewContext;
|
||||
|
@ -1,6 +1,8 @@
|
||||
#define DIRECTINPUT_VERSION 0x800
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
|
||||
#define RECOVERINPUTLOST TRUE // to become a flag?
|
||||
|
||||
#include <windows.h>
|
||||
#include <dinput.h>
|
||||
#include "dxwnd.h"
|
||||
@ -179,10 +181,10 @@ HRESULT WINAPI extDirectInputCreateEx(HINSTANCE hinst, DWORD dwversion, REFIID r
|
||||
OutTraceE("DirectInputCreateEx: ERROR err=%x(%s)\n", res, ExplainDDError(res));
|
||||
return res;
|
||||
}
|
||||
SetHook((void *)(**(DWORD **)ppvout + 12), extDICreateDevice, (void **)&pDICreateDevice, "CreateDevice(I)");
|
||||
SetHook((void *)(**(DWORD **)ppvout + 16), extDIEnumDevices, (void **)&pDIEnumDevices, "EnumDevices(I)");
|
||||
if(dwversion > 700)
|
||||
SetHook((void *)(**(DWORD **)ppvout + 36), extDICreateDeviceEx, (void **)&pDICreateDeviceEx, "DICreateDeviceEx(I)");
|
||||
SetHook((void *)(**(DWORD **)ppvout + 12), extDICreateDevice, (void **)&pDICreateDevice, "CreateDevice(I7)");
|
||||
SetHook((void *)(**(DWORD **)ppvout + 16), extDIEnumDevices, (void **)&pDIEnumDevices, "EnumDevices(I7)");
|
||||
if(dwversion >= 700)
|
||||
SetHook((void *)(**(DWORD **)ppvout + 36), extDICreateDeviceEx, (void **)&pDICreateDeviceEx, "CreateDeviceEx(I7)");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -197,11 +199,22 @@ HRESULT WINAPI extDIQueryInterface(void * lpdi, REFIID riid, LPVOID *obp)
|
||||
if(res) return res;
|
||||
|
||||
switch(riid.Data1){
|
||||
case 0x5944E662: //DirectInput2A
|
||||
case 0x5944E663: //DirectInput2W
|
||||
case 0x89521360: //DirectInputA
|
||||
case 0x89521361: //DirectInputW
|
||||
SetHook((void *)(**(DWORD **)obp + 12), extDICreateDevice, (void **)&pDICreateDevice, "CreateDevice(I)");
|
||||
SetHook((void *)(**(DWORD **)obp + 16), extDIEnumDevices, (void **)&pDIEnumDevices, "EnumDevices(I)");
|
||||
break;
|
||||
case 0x5944E662: //DirectInput2A
|
||||
case 0x5944E663: //DirectInput2W
|
||||
SetHook((void *)(**(DWORD **)obp + 12), extDICreateDevice, (void **)&pDICreateDevice, "CreateDevice(I2)");
|
||||
SetHook((void *)(**(DWORD **)obp + 16), extDIEnumDevices, (void **)&pDIEnumDevices, "EnumDevices(I2)");
|
||||
break;
|
||||
case 0x9A4CB684: //IDirectInput7A
|
||||
case 0x9A4CB685: //IDirectInput7W
|
||||
SetHook((void *)(**(DWORD **)obp + 12), extDICreateDevice, (void **)&pDICreateDevice, "CreateDevice(I7)");
|
||||
SetHook((void *)(**(DWORD **)obp + 16), extDIEnumDevices, (void **)&pDIEnumDevices, "EnumDevices(I7)");
|
||||
SetHook((void *)(**(DWORD **)obp + 36), extDICreateDeviceEx, (void **)&pDICreateDeviceEx, "CreateDeviceEx(I7)");
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -403,6 +416,17 @@ HRESULT WINAPI extGetDeviceState(LPDIRECTINPUTDEVICE lpdid, DWORD cbdata, LPDIMO
|
||||
OutTraceDW("GetDeviceState(I): did=%x cbData=%i,%i\n", lpdid, cbdata, dxw.bActive);
|
||||
|
||||
res = (*pGetDeviceState)(lpdid, cbdata, lpvdata);
|
||||
|
||||
if ((res == DIERR_INPUTLOST) && RECOVERINPUTLOST){
|
||||
OutTraceE("GetDeviceState(I) recovering DIERR_INPUTLOST\n");
|
||||
res = (*pDISetCooperativeLevel)(lpdid, dxw.GethWnd(), DISCL_NONEXCLUSIVE | DISCL_FOREGROUND);
|
||||
if(res) OutTraceE("GetDeviceState(I): SetCooperativeLevel ERROR: err=%x(%s)\n", res, ExplainDDError(res));
|
||||
res = (*pAcquire)(lpdid);
|
||||
if(res) OutTraceE("GetDeviceState(I): Acquire ERROR: err=%x(%s)\n", res, ExplainDDError(res));
|
||||
if(dxw.dwFlags1 & CLIPCURSOR) dxw.SetClipCursor();
|
||||
res = (*pGetDeviceState)(lpdid, cbdata, lpvdata);
|
||||
}
|
||||
|
||||
switch(res){
|
||||
case DI_OK:
|
||||
break;
|
||||
@ -419,14 +443,29 @@ HRESULT WINAPI extGetDeviceState(LPDIRECTINPUTDEVICE lpdid, DWORD cbdata, LPDIMO
|
||||
if( cbdata == sizeof(DIMOUSESTATE) || cbdata == sizeof(DIMOUSESTATE2)
|
||||
// || cbdata == sizeof(DIJOYSTATE) || cbdata == sizeof(DIJOYSTATE2)
|
||||
){
|
||||
int iMaxX, iMaxY, iMinX, iMinY;
|
||||
if(dxw.dwFlags1 & MODIFYMOUSE){
|
||||
iMinX = iCurMinX ? iCurMinX : 0;
|
||||
iMaxX = iCurMaxX ? iCurMaxX : dxw.GetScreenWidth();
|
||||
iMinY = iCurMinY ? iCurMinY : 0;
|
||||
iMaxY = iCurMaxY ? iCurMaxY : dxw.GetScreenHeight();
|
||||
}
|
||||
else {
|
||||
RECT WinRect = dxw.GetMainWindow();
|
||||
iMinX = iCurMinX ? iCurMinX : WinRect.left;
|
||||
iMaxX = iCurMaxX ? iCurMaxX : WinRect.right;
|
||||
iMinY = iCurMinY ? iCurMinY : WinRect.top;
|
||||
iMaxY = iCurMaxY ? iCurMaxY : WinRect.bottom;
|
||||
}
|
||||
OutTraceB("GetDeviceState(I): CLIP (%d,%d)-(%d,%d)\n", iMinX, iMinY, iMaxX, iMaxY);
|
||||
GetMousePosition((int *)&p.x, (int *)&p.y);
|
||||
lpvdata->lX = p.x;
|
||||
lpvdata->lY = p.y;
|
||||
if(!dxw.bDInputAbs){
|
||||
if(p.x < iCurMinX) p.x = iCurMinX;
|
||||
if(p.x > iCurMaxX) p.x = iCurMaxX;
|
||||
if(p.y < iCurMinY) p.y = iCurMinY;
|
||||
if(p.y > iCurMaxY) p.y = iCurMaxY;
|
||||
if(p.x < iMinX) p.x = iMinX;
|
||||
if(p.x > iMaxX) p.x = iMaxX;
|
||||
if(p.y < iMinY) p.y = iMinY;
|
||||
if(p.y > iMaxY) p.y = iMaxY;
|
||||
lpvdata->lX = p.x - iCursorX;
|
||||
lpvdata->lY = p.y - iCursorY;
|
||||
iCursorX = p.x;
|
||||
@ -607,10 +646,12 @@ void ToggleAcquiredDevices(BOOL flag)
|
||||
if(lpDIDSysMouse) (*pAcquire)(lpDIDSysMouse);
|
||||
if(lpDIDKeyboard) (*pAcquire)(lpDIDKeyboard);
|
||||
if(lpDIDJoystick) (*pAcquire)(lpDIDJoystick);
|
||||
if (dxw.dwFlags1 & CLIPCURSOR) dxw.SetClipCursor();
|
||||
}
|
||||
if(!flag && pUnacquire){
|
||||
if(lpDIDSysMouse) (*pUnacquire)(lpDIDSysMouse);
|
||||
if(lpDIDKeyboard) (*pUnacquire)(lpDIDKeyboard);
|
||||
if(lpDIDJoystick) (*pUnacquire)(lpDIDJoystick);
|
||||
if (dxw.dwFlags1 & CLIPCURSOR) dxw.EraseClipCursor();
|
||||
}
|
||||
}
|
||||
|
@ -1222,12 +1222,18 @@ void HookInit(TARGETMAP *target, HWND hwnd)
|
||||
|
||||
if(IsTraceDW){
|
||||
char sInfo[1024];
|
||||
OSVERSIONINFO osinfo;
|
||||
strcpy(sInfo, "");
|
||||
if(hwnd) sprintf(sInfo, " hWnd=%x(hdc=%x) dxw.hParentWnd=%x(hdc=%x) desktop=%x(hdc=%x)",
|
||||
hwnd, GetDC(hwnd), dxw.hParentWnd, GetDC(dxw.hParentWnd), GetDesktopWindow(), GetDC(GetDesktopWindow()));
|
||||
OutTrace("HookInit: path=\"%s\" module=\"%s\" dxversion=%s pos=(%d,%d) size=(%d,%d)%s\n",
|
||||
target->path, target->module, dxversions[dxw.dwTargetDDVersion],
|
||||
target->posx, target->posy, target->sizx, target->sizy, sInfo);
|
||||
osinfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
||||
if(GetVersionEx(&osinfo)){
|
||||
OutTrace("OS=(%d.%d) build=%d platform=%d service pack=%s\n",
|
||||
osinfo.dwMajorVersion, osinfo.dwMinorVersion, osinfo.dwPlatformId, osinfo.dwPlatformId, osinfo.szCSDVersion);
|
||||
}
|
||||
if (dxw.dwFlags4 & LIMITSCREENRES) OutTrace("HookInit: max resolution=%s\n", (dxw.MaxScreenRes<6)?Resolutions[dxw.MaxScreenRes]:"unknown");
|
||||
}
|
||||
|
||||
|
@ -452,10 +452,15 @@ void dxwCore::SetClipCursor()
|
||||
OutTraceDW("SetClipCursor: ASSERT hWnd==NULL\n");
|
||||
return;
|
||||
}
|
||||
if(!(*pGetClientRect)(hWnd, &Rect))
|
||||
// check for errors to avoid setting random clip regions
|
||||
if(!(*pGetClientRect)(hWnd, &Rect)){
|
||||
OutTraceE("GetClientRect: ERROR err=%d at %d\n", GetLastError(), __LINE__);
|
||||
if(!(*pClientToScreen)(hWnd, &UpLeftCorner))
|
||||
return;
|
||||
}
|
||||
if(!(*pClientToScreen)(hWnd, &UpLeftCorner)){
|
||||
OutTraceE("ClientToScreen: ERROR err=%d at %d\n", GetLastError(), __LINE__);
|
||||
return ;
|
||||
}
|
||||
Rect.left+=UpLeftCorner.x;
|
||||
Rect.right+=UpLeftCorner.x;
|
||||
Rect.top+=UpLeftCorner.y;
|
||||
@ -782,6 +787,19 @@ void dxwCore::UnmapWindow(LPRECT rect)
|
||||
rect->bottom= ((rect->bottom - upleft.y) * (int)dwScreenHeight) / client.bottom;
|
||||
}
|
||||
|
||||
RECT dxwCore::GetMainWindow()
|
||||
{
|
||||
RECT client;
|
||||
POINT upleft = {0,0};
|
||||
(*pGetClientRect)(hWnd, &client);
|
||||
(*pClientToScreen)(hWnd, &upleft);
|
||||
client.left += upleft.x;
|
||||
client.right += upleft.x;
|
||||
client.top += upleft.y;
|
||||
client.bottom += upleft.y;
|
||||
return client;
|
||||
}
|
||||
|
||||
void dxwCore::UnmapWindow(LPPOINT point)
|
||||
{
|
||||
RECT client;
|
||||
|
@ -78,6 +78,7 @@ public: // methods
|
||||
void MapWindow(int *, int *, int *, int *);
|
||||
void UnmapWindow(LPRECT);
|
||||
void UnmapWindow(LPPOINT);
|
||||
RECT GetMainWindow(void);
|
||||
void FixWorkarea(LPRECT);
|
||||
RECT GetScreenRect(void);
|
||||
RECT GetUnmappedScreenRect();
|
||||
|
@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "TlHelp32.h"
|
||||
|
||||
#define VERSION "2.03.49"
|
||||
#define VERSION "2.03.50"
|
||||
|
||||
#define DDTHREADLOCK 1
|
||||
//#define LOCKTHREADS
|
||||
|
Binary file not shown.
@ -502,6 +502,10 @@
|
||||
RelativePath=".\dxwcore.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Include\dxwnd.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\glhook.h"
|
||||
>
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
extern void HookOpenGLLibs(HMODULE, char *);
|
||||
|
||||
typedef GLenum (WINAPI *glGetError_Type)();
|
||||
typedef void (WINAPI *glViewport_Type)(GLint, GLint, GLsizei, GLsizei);
|
||||
typedef void (WINAPI *glScissor_Type)(GLint, GLint, GLsizei, GLsizei);
|
||||
typedef void (WINAPI *glGetIntegerv_Type)(GLenum, GLint *);
|
||||
@ -17,6 +18,7 @@ typedef BOOL (WINAPI *wglMakeCurrent_Type)(HDC, HGLRC);
|
||||
typedef void (WINAPI *glTexImage2D_Type)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
|
||||
typedef void (WINAPI *glPixelZoom_Type)(GLfloat, GLfloat);
|
||||
|
||||
extern GLenum WINAPI extglGetError();
|
||||
extern void WINAPI extglViewport(GLint, GLint, GLsizei, GLsizei);
|
||||
extern void WINAPI extglScissor(GLint, GLint, GLsizei, GLsizei);
|
||||
extern void WINAPI extglGetIntegerv(GLenum, GLint *);
|
||||
@ -45,6 +47,7 @@ extern void WINAPI extglPixelZoom(GLfloat, GLfloat);
|
||||
#endif
|
||||
|
||||
// GDI32.dll:
|
||||
DXWEXTERN glGetError_Type pglGetError;
|
||||
DXWEXTERN glViewport_Type pglViewport;
|
||||
DXWEXTERN glScissor_Type pglScissor;
|
||||
DXWEXTERN glGetIntegerv_Type pglGetIntegerv;
|
||||
|
@ -44,6 +44,7 @@ typedef HRESULT (WINAPI *EnumSurfaces4_Type)(LPDIRECTDRAW, DWORD, LPDDSURFACEDES
|
||||
typedef HRESULT (WINAPI *FlipToGDISurface_Type)(LPDIRECTDRAW);
|
||||
typedef HRESULT (WINAPI *GetCapsD_Type)(LPDIRECTDRAW, LPDDCAPS, LPDDCAPS);
|
||||
typedef HRESULT (WINAPI *GetDisplayMode_Type)(LPDIRECTDRAW, LPDDSURFACEDESC);
|
||||
typedef HRESULT (WINAPI *GetDisplayMode4_Type)(LPDIRECTDRAW, LPDDSURFACEDESC2);
|
||||
typedef HRESULT (WINAPI *GetFourCCCodes_Type)(LPDIRECTDRAW, LPDWORD, LPDWORD);
|
||||
typedef HRESULT (WINAPI *GetGDISurface_Type)(LPDIRECTDRAW, LPDIRECTDRAWSURFACE *);
|
||||
typedef HRESULT (WINAPI *GetMonitorFrequency_Type)(LPDIRECTDRAW, LPDWORD);
|
||||
|
@ -25,6 +25,7 @@
|
||||
//glDrawPixels_Type pglDrawPixels = NULL;
|
||||
|
||||
static HookEntry_Type Hooks[]={
|
||||
{HOOK_IAT_CANDIDATE, "glGetError", NULL, (FARPROC *)&pglGetError, (FARPROC)extglGetError},
|
||||
{HOOK_IAT_CANDIDATE, "glViewport", NULL, (FARPROC *)&pglViewport, (FARPROC)extglViewport},
|
||||
{HOOK_IAT_CANDIDATE, "glScissor", NULL, (FARPROC *)&pglScissor, (FARPROC)extglScissor},
|
||||
{HOOK_IAT_CANDIDATE, "glGetIntegerv", NULL, (FARPROC *)&pglGetIntegerv, (FARPROC)&extglGetIntegerv},
|
||||
@ -113,6 +114,13 @@ void HookOpenGLLibs(HMODULE module, char *customlib)
|
||||
return;
|
||||
}
|
||||
|
||||
GLenum WINAPI extglGetError()
|
||||
{
|
||||
// to avoid dependencies on opengl32.dll
|
||||
if (pglGetError) return (*pglGetError)();
|
||||
return GL_NO_ERROR;
|
||||
}
|
||||
|
||||
void WINAPI extglViewport(GLint x, GLint y, GLsizei width, GLsizei height)
|
||||
{
|
||||
RECT client;
|
||||
@ -485,7 +493,7 @@ void WINAPI extglDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum
|
||||
width, height, format, ExplainDrawPixelsFormat(format), type, data);
|
||||
|
||||
(*pglDrawPixels)(width, height, format, type, data);
|
||||
if ((glerr=glGetError())!= GL_NO_ERROR) OutTrace("GLERR %d ad %d\n", glerr, __LINE__);
|
||||
if ((glerr=extglGetError())!= GL_NO_ERROR) OutTrace("GLERR %d ad %d\n", glerr, __LINE__);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
@ -503,6 +511,6 @@ void WINAPI extglPixelZoom(GLfloat xfactor, GLfloat yfactor)
|
||||
OutTraceDW("glPixelZoom: FIXED x,y factor=(%f,%f)\n", xfactor, yfactor);
|
||||
}
|
||||
(*pglPixelZoom)(xfactor, yfactor);
|
||||
if ((glerr=glGetError())!= GL_NO_ERROR) OutTrace("GLERR %d ad %d\n", glerr, __LINE__);
|
||||
if ((glerr=extglGetError())!= GL_NO_ERROR) OutTrace("GLERR %d ad %d\n", glerr, __LINE__);
|
||||
return;
|
||||
}
|
||||
|
@ -1530,6 +1530,8 @@ static HWND WINAPI extCreateWindowCommon(
|
||||
(*pShowWindow)(hwnd, SW_MAXIMIZE);
|
||||
}
|
||||
|
||||
if(dxw.dwFlags1 & CLIPCURSOR) dxw.SetClipCursor();
|
||||
|
||||
OutTraceDW("%s: ret=%x\n", ApiName, hwnd);
|
||||
return hwnd;
|
||||
}
|
||||
@ -1671,33 +1673,25 @@ LRESULT WINAPI extCallWindowProcW(WNDPROC lpPrevWndFunc, HWND hwnd, UINT Msg, WP
|
||||
LRESULT WINAPI extDefWindowProcA(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
// v2.02.30: fix (Imperialism II): apply to main window only !!!
|
||||
// v2.03.50: fix - do clip cursor only after the window has got focus
|
||||
HRESULT res;
|
||||
|
||||
res = (HRESULT)-1;
|
||||
if(hwnd == dxw.GethWnd()) res=FixWindowProc("DefWindowProcA", hwnd, Msg, wParam, &lParam);
|
||||
|
||||
if (res==(HRESULT)-1) res = (*pDefWindowProcA)(hwnd, Msg, wParam, lParam);
|
||||
if((Msg == WM_SETFOCUS) && (dxw.dwFlags1 & CLIPCURSOR)) dxw.SetClipCursor();
|
||||
|
||||
if (res==(HRESULT)-1)
|
||||
return (*pDefWindowProcA)(hwnd, Msg, wParam, lParam);
|
||||
else
|
||||
return res;
|
||||
return res;
|
||||
}
|
||||
|
||||
LRESULT WINAPI extDefWindowProcW(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
// v2.02.30: fix (Imperialism II): apply to main window only !!!
|
||||
// v2.03.50: fix - do clip cursor only after the window has got focus
|
||||
HRESULT res;
|
||||
|
||||
res = (HRESULT)-1;
|
||||
if(hwnd == dxw.GethWnd()) res=FixWindowProc("DefWindowProcW", hwnd, Msg, wParam, &lParam);
|
||||
|
||||
if (res==(HRESULT)-1) res = (*pDefWindowProcW)(hwnd, Msg, wParam, lParam);
|
||||
if((Msg == WM_SETFOCUS) && (dxw.dwFlags1 & CLIPCURSOR)) dxw.SetClipCursor();
|
||||
|
||||
if (res==(HRESULT)-1)
|
||||
return (*pDefWindowProcW)(hwnd, Msg, wParam, lParam);
|
||||
else
|
||||
return res;
|
||||
return res;
|
||||
}
|
||||
|
||||
static int HandleRect(char *ApiName, void *pFun, HDC hdc, const RECT *lprc, HBRUSH hbr)
|
||||
|
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user