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

v2_02_57_src

Former-commit-id: a455e9f9a90a738277d36b455a790466f0fadc48
This commit is contained in:
gho tik 2014-06-02 12:38:47 -04:00 committed by Refael ACkermann
parent 0d1d1fc6b8
commit f8ee9807cd
13 changed files with 165 additions and 46 deletions

View File

@ -128,7 +128,7 @@
#define LIMITSCREENRES 0x00001000 // Limit available screen resolution up to defined maximum
#define NOFILLRECT 0x00002000 // Suppress FillRect calls
#define HOOKGLIDE 0x00004000 // Hook glide calls
#define HIDEDESKTOP 0x00004000 // Hide desktop background
#define HIDEDESKTOP 0x00008000 // Hide desktop background
// logging Tflags DWORD:
#define OUTTRACE 0x00000001 // enables tracing to dxwnd.log in general

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0ab0518cd95cd490131b9ba49cc94686af2bdc129622f112e8499bc5c386cc42
size 458240
oid sha256:4afdf78c8226b629ed5e70a1fe3d1e79ac6e8293bc1e2ac74b2257d59d10f6d7
size 457728

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a63a5100db9d65c9b66846c79b6cb41578fccabd9de5bb4ba788b371bb72b25f
oid sha256:8f349082b6ce4e630b509e9dc5903c05b296b7fa6b071c1885241ea5c4cf2ed7
size 535040

View File

@ -2528,11 +2528,11 @@ title101=Syberia
path101=D:\Games\Syberia\Syberia.exe
module101=
opengllib101=
ver101=0
ver101=7
coord101=0
flag101=822116385
flag101=956334113
flagg101=1242562576
flagh101=20
flagh101=65556
flagi101=4
tflag101=6170
initx101=150
@ -3074,8 +3074,64 @@ maxfps122=0
initts122=0
winver122=0
maxres122=0
title123=Black Thorn
path123=D:\Games\Black Thorn\BlackThorn.exe
module123=
opengllib123=
ver123=0
coord123=0
flag123=692076580
flagg123=1207959552
flagh123=20
flagi123=4
tflag123=6211
initx123=0
inity123=0
minx123=0
miny123=0
maxx123=0
maxy123=0
posx123=50
posy123=50
sizx123=800
sizy123=600
maxfps123=0
initts123=0
winver123=0
maxres123=-1
title124=Empire of the Ants
path124=D:\Games\Empire of the Ants\Game.exe
module124=
opengllib124=
ver124=0
coord124=0
flag124=1023426596
flagg124=134217744
flagh124=20
flagi124=4
tflag124=6466
initx124=0
inity124=0
minx124=0
miny124=0
maxx124=0
maxy124=0
posx124=50
posy124=50
sizx124=800
sizy124=600
maxfps124=0
initts124=0
winver124=0
maxres124=-1
title125=Red Storm: Rogue Spear
module125=
opengllib125=
title126=Black Thorn
module126=
opengllib126=
[window]
posx=1035
posy=288
posx=1129
posy=466
sizx=638
sizy=448

View File

@ -0,0 +1,26 @@
[target]
title0=Black Thorn
path0=D:\Games\Red Storm Entertainment\Rogue Spear\BlackThorn.exe
module0=
opengllib0=
ver0=0
coord0=0
flag0=939540517
flagg0=134217728
flagh0=20
flagi0=36
tflag0=6470
initx0=0
inity0=0
minx0=0
miny0=0
maxx0=0
maxy0=0
posx0=50
posy0=50
sizx0=800
sizy0=600
maxfps0=0
initts0=0
winver0=0
maxres0=-1

View File

@ -0,0 +1,26 @@
[target]
title0=Empire of the Ants
path0=D:\Games\Empire of the Ants\Game.exe
module0=
opengllib0=
ver0=0
coord0=0
flag0=402669604
flagg0=134217728
flagh0=20
flagi0=4
tflag0=64
initx0=0
inity0=0
minx0=0
miny0=0
maxx0=0
maxy0=0
posx0=50
posy0=50
sizx0=800
sizy0=600
maxfps0=0
initts0=0
winver0=0
maxres0=-1

View File

@ -386,4 +386,9 @@ fixed several d3d1-7 hooks: prevented some d3d games to properly work, i.e. "Thi
fixed d3d GetDisplayMode to return virtual desktop size - fixed "Affari Tuoi", an italian game.
fixed some log messages
v2.02.57
fixed WS_NCCALCSIZE & WM_NCPAINT messages to ensure a proper window's border and size - fixed Black Thorn window problems
fixed "Hide desktop background" flag

View File

@ -453,7 +453,7 @@ static void DescribeSurface(LPDIRECTDRAWSURFACE lpdds, int dxversion, char *labe
break;
}
if(res)return;
OutTrace("Surface %s: ddsd=%x dxversion=%d ", label, lpdds, dxversion);
OutTraceDW("Surface %s: ddsd=%x dxversion=%d ", label, lpdds, dxversion);
LogSurfaceAttributes((LPDDSURFACEDESC)&ddsd, label, line);
}

View File

@ -71,7 +71,7 @@ static char *Flag4Names[32]={
"NOALPHACHANNEL", "SUPPRESSCHILD", "FIXREFCOUNTER", "SHOWTIMESTRETCH",
"ZBUFFERCLEAN", "ZBUFFER0CLEAN", "ZBUFFERALWAYS", "DISABLEFOGGING",
"NOPOWER2FIX", "NOPERFCOUNTER", "ADDPROXYLIBS", "INTERCEPTRDTSC",
"LIMITSCREENRES", "NOFILLRECT", "HOOKGLIDE", "",
"LIMITSCREENRES", "NOFILLRECT", "HOOKGLIDE", "HIDEDESKTOP",
"", "", "", "",
"", "", "", "",
"", "", "", "",
@ -814,37 +814,10 @@ LRESULT CALLBACK extWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
}
break;
case WM_NCCALCSIZE:
if((dxw.dwFlags1 & LOCKWINPOS) && (hwnd == dxw.GethWnd())){ // v2.02.30: don't alter child and other windows....
OutTraceDW("WindowProc: WS_NCCALCSIZE wparam=%x\n", wparam);
if(wparam){
// nothing so far ....
if (IsDebug){
NCCALCSIZE_PARAMS *ncp;
ncp = (NCCALCSIZE_PARAMS *) lparam;
OutTraceDW("WindowProc: WS_NCCALCSIZE rect[0]=(%d,%d)-(%d,%d)\n",
ncp->rgrc[0].left, ncp->rgrc[0].top, ncp->rgrc[0].right, ncp->rgrc[0].bottom);
OutTraceDW("WindowProc: WS_NCCALCSIZE rect[1]=(%d,%d)-(%d,%d)\n",
ncp->rgrc[1].left, ncp->rgrc[1].top, ncp->rgrc[1].right, ncp->rgrc[1].bottom);
OutTraceDW("WindowProc: WS_NCCALCSIZE rect[2]=(%d,%d)-(%d,%d)\n",
ncp->rgrc[2].left, ncp->rgrc[2].top, ncp->rgrc[2].right, ncp->rgrc[2].bottom);
OutTraceDW("WindowProc: WS_NCCALCSIZE winrect=(%d,%d)-(%d,%d)\n",
ncp->lppos->x, ncp->lppos->y, ncp->lppos->cx, ncp->lppos->cy);
}
}
else {
// enforce win coordinates and return 0xF0 = WVR_ALIGNTOP|WVR_ALIGNLEFT|WVR_ALIGNBOTTOM|WVR_ALIGNRIGHT;
LPRECT rect;
rect=(LPRECT)lparam;
OutTraceB("WindowProc: WS_NCCALCSIZE proposed rect=(%d,%d)-(%d,%d)\n",
rect->left, rect->top, rect->right, rect->bottom);
rect->left=dxw.iPosX;
rect->top=dxw.iPosY;
rect->right=dxw.iPosX+dxw.iSizX;
rect->bottom=dxw.iPosY+dxw.iSizY;
OutTraceB("WindowProc: WS_NCCALCSIZE fixed rect=(%d,%d)-(%d,%d)\n",
rect->left, rect->top, rect->right, rect->bottom);
return WVR_ALIGNTOP|WVR_ALIGNLEFT|WVR_ALIGNBOTTOM|WVR_ALIGNRIGHT;
}
case WM_NCPAINT:
if((dxw.dwFlags1 & LOCKWINPOS) && (hwnd == dxw.GethWnd()) && dxw.IsFullScreen()){ // v2.02.30: don't alter child and other windows....
OutTraceDW("WindowProc: %s wparam=%x\n", ExplainWinMessage(message), wparam);
return (*pDefWindowProc)(hwnd, message, wparam, lparam);
}
break;
case WM_NCCREATE:

View File

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

Binary file not shown.

View File

@ -618,6 +618,17 @@ HRESULT WINAPI extCreateViewport3(void *lpd3d, LPDIRECT3DVIEWPORT3 *lpViewport,
if(res) OutTraceE("CreateViewport(3) ERROR: err=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
else OutTraceD3D("CreateViewport(3): Viewport=%x\n", *lpViewport);
HookViewport((LPDIRECT3DVIEWPORT *)lpViewport, 3);
if(IsDebug){
HRESULT res2;
D3DVIEWPORT2 vpdesc;
vpdesc.dwSize = sizeof(D3DVIEWPORT2);
res2=(*pGetViewport2_3)(*lpViewport, &vpdesc);
if(res)
OutTraceE("CreateViewport(3) ERROR: err=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
else
OutTraceD3D("CreateViewport(3): size=%d pos=(%d,%d) dim=(%dx%d)\n",
vpdesc.dwSize, vpdesc.dwX, vpdesc.dwY, vpdesc.dwWidth, vpdesc.dwHeight);
}
return res;
}
@ -1115,17 +1126,39 @@ HRESULT WINAPI extGetCurrentViewport3(void *d3dd, LPDIRECT3DVIEWPORT3 *lpd3dvp)
return res;
}
HookViewport((LPDIRECT3DVIEWPORT *)lpd3dvp, 3);
if(IsDebug){
HRESULT res2;
D3DVIEWPORT2 vpdesc;
vpdesc.dwSize = sizeof(D3DVIEWPORT2);
res2=(*pGetViewport2_3)(lpd3dvp, &vpdesc);
if(res)
OutTraceE("GetCurrentViewport(D3DD3) ERROR: err=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
else
OutTraceD3D("GetCurrentViewport(D3DD3): size=%d pos=(%d,%d) dim=(%dx%d)\n",
vpdesc.dwSize, vpdesc.dwX, vpdesc.dwY, vpdesc.dwWidth, vpdesc.dwHeight);
}
return res;
}
HRESULT WINAPI extSetCurrentViewport3(void *lpvp, LPDIRECT3DVIEWPORT3 vpd)
HRESULT WINAPI extSetCurrentViewport3(void *lpvp, LPDIRECT3DVIEWPORT3 lpd3dvp)
{
HRESULT res;
OutTraceD3D("SetCurrentViewport(D3DD3): viewport=%x\n", lpvp, vpd);
res=(*pSetCurrentViewport3)(lpvp, vpd);
OutTraceD3D("SetCurrentViewport(D3DD3): viewport=%x\n", lpvp, lpd3dvp);
res=(*pSetCurrentViewport3)(lpvp, lpd3dvp);
if(res) OutTraceE("SetCurrentViewport(D3DD3) ERROR: err=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
else OutTraceD3D("SetCurrentViewport(D3DD3): OK\n");
if(IsDebug){
HRESULT res2;
D3DVIEWPORT2 vpdesc;
vpdesc.dwSize = sizeof(D3DVIEWPORT2);
res2=(*pGetViewport2_3)(lpd3dvp, &vpdesc);
if(res)
OutTraceE("SetCurrentViewport(D3DD3) ERROR: err=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
else
OutTraceD3D("SetCurrentViewport(D3DD3): size=%d pos=(%d,%d) dim=(%dx%d)\n",
vpdesc.dwSize, vpdesc.dwX, vpdesc.dwY, vpdesc.dwWidth, vpdesc.dwHeight);
}
return res;
}

Binary file not shown.