mirror of
https://github.com/DxWnd/DxWnd.reloaded
synced 2024-12-30 09:25:35 +01:00
v2_02_83_src
Former-commit-id: 92e043dea7b1888f0d7c5119909c05b61c65e90e
This commit is contained in:
parent
94efbbf690
commit
2f23ca3519
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:763a6c83e88092d518e00b641db5f1ec1e1f03273966fa62c3023f5fab35d63c
|
||||
oid sha256:f4ebe7bb2d5b4f0c2e01945a42c267f0cf4ed997b613467bb6d6765c7e8bd509
|
||||
size 125952
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9768c3856e6e7eb99d2a1aa84738dbf54f4742d22f9e3ab85b7e2c1bfcf1a349
|
||||
size 125952
|
||||
oid sha256:a7877cda228843a7292dcc2ef71b5137b271f8b9e179d9c23e28ed8d2f4312b3
|
||||
size 131072
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b94cb7ee037071908b8b6e8f585c2e20a598de3d21d47c6ed2772603c7509571
|
||||
size 131584
|
||||
oid sha256:0d432898e566dcd63845603d2035796f30d83c37f6151631449b296808a8448d
|
||||
size 132096
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:053fb6f12d42bc12bc80eac6aae9f57621783b3b69bed282eab3bc43ecde0a01
|
||||
size 491520
|
||||
oid sha256:b912c24a11f692bacad5acc260300f9410524d6d99915935a5833a20b3162c3d
|
||||
size 492544
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8eea2972772c9c037a22822bcc7caa6a42b94e34c0d1e0e94da53eff32f8879f
|
||||
oid sha256:85a9f4ba115a7a9fbe4c8712b8778240b6269f74e1530154204c8f1fdfe1e461
|
||||
size 548864
|
||||
|
Binary file not shown.
27
build/exports/Tetris Worlds.dxw
Normal file
27
build/exports/Tetris Worlds.dxw
Normal file
@ -0,0 +1,27 @@
|
||||
[target]
|
||||
title0=Tetris Worlds
|
||||
path0=D:\Games\Tetris Worlds\TetrisWorlds.exe
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
ver0=1
|
||||
coord0=0
|
||||
flag0=134217760
|
||||
flagg0=134217728
|
||||
flagh0=16
|
||||
flagi0=138412032
|
||||
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=4
|
||||
winver0=0
|
||||
maxres0=-1
|
@ -1,5 +1,5 @@
|
||||
[window]
|
||||
posx=1289
|
||||
posy=149
|
||||
sizx=465
|
||||
sizy=382
|
||||
posx=1547
|
||||
posy=779
|
||||
sizx=320
|
||||
sizy=200
|
||||
|
@ -538,4 +538,11 @@ fix: hooked GetMonitorInfoA/W that is a possible way to get the screen resolutio
|
||||
|
||||
v2.02.82
|
||||
fix: completed chinese translation and language selection through dxwnd.ini file.
|
||||
added very preliminary (and incomplete) italian translation for debugging.
|
||||
added very preliminary (and incomplete) italian translation for debugging.
|
||||
|
||||
v2.02.83
|
||||
fix: small error in one coordinate scaling procedure
|
||||
fix: completed translation in italian (just for testing....)
|
||||
fix: added palette window activation in icon tray menu
|
||||
fix: supppressed BackBuffer release within D3D7:CreateDevice: this makes "Tetris Worlds" fully playable
|
||||
add: build-in check for compatibility modes set!
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
Binary file not shown.
@ -1,10 +0,0 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
|
||||
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level='asInvoker' uiAccess='false' />
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
||||
Manifest resource last updated at 0:24:39.39 on 30/06/2014
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -17,6 +17,7 @@
|
||||
#include "syslibs.h"
|
||||
|
||||
extern BOOL IsChangeDisplaySettingsHotPatched;
|
||||
BOOL bDontReleaseBackBuffer = FALSE;
|
||||
|
||||
// DirectDraw API
|
||||
HRESULT WINAPI extDirectDrawCreate(GUID FAR *, LPDIRECTDRAW FAR *, IUnknown FAR *);
|
||||
@ -752,6 +753,30 @@ Unlock4_Type pUnlockMethod(LPDIRECTDRAWSURFACE lpdds)
|
||||
return (Unlock4_Type)pUnlock1;
|
||||
}
|
||||
|
||||
#if 0
|
||||
Lock_Type pLockMethod(LPDIRECTDRAWSURFACE lpdds)
|
||||
{
|
||||
char sMsg[81];
|
||||
void * extUnlock;
|
||||
__try{ // v2.02.31: catch some possible exception (i.e. Abomination in EMULATION mode)
|
||||
extUnlock=(void *)*(DWORD *)(*(DWORD *)lpdds + 128);
|
||||
}
|
||||
__except (EXCEPTION_EXECUTE_HANDLER){
|
||||
OutTraceE("Exception at %d\n",__LINE__);
|
||||
return (Unlock4_Type)pUnlock1;
|
||||
};
|
||||
if(extUnlock==(void *)extUnlock1) return pLock1;
|
||||
if(extUnlock==(void *)extUnlock4) return pLock4;
|
||||
if(extUnlock==(void *)extUnlockDir1) return pLock1;
|
||||
if(extUnlock==(void *)extUnlockDir4) return pLock4;
|
||||
sprintf_s(sMsg, 80, "pLockMethod: pUnlock(%x) can't match %x\n", lpdds, extUnlock);
|
||||
OutTraceDW(sMsg);
|
||||
if (IsAssertEnabled) MessageBox(0, sMsg, "pLockMethod", MB_OK | MB_ICONEXCLAMATION);
|
||||
if (pLock4) return pLock4;
|
||||
return pLock1;
|
||||
}
|
||||
#endif
|
||||
|
||||
CreateSurface2_Type pCreateSurfaceMethod(LPDIRECTDRAWSURFACE lpdds)
|
||||
{
|
||||
char sMsg[81];
|
||||
@ -3783,7 +3808,7 @@ HRESULT WINAPI extUnlock(int dxversion, Unlock4_Type pUnlock, LPDIRECTDRAWSURFAC
|
||||
if ((dxversion == 4) && lprect) CleanRect(&lprect,__LINE__);
|
||||
|
||||
if(IsTraceDDRAW){
|
||||
OutTrace("Unlock: lpdds=%x%s ", lpdds, (IsPrim ? "(PRIM)":""));
|
||||
OutTrace("Unlock(%d): lpdds=%x%s ", dxversion, lpdds, (IsPrim ? "(PRIM)":""));
|
||||
if (dxversion == 4){
|
||||
if (lprect){
|
||||
OutTrace("rect=(%d,%d)-(%d,%d)\n", lprect->left, lprect->top, lprect->right, lprect->bottom);
|
||||
@ -4253,8 +4278,13 @@ HRESULT WINAPI extReleaseS(LPDIRECTDRAWSURFACE lpdds)
|
||||
|
||||
IsPrim=dxw.IsAPrimarySurface(lpdds);
|
||||
IsBack=dxw.IsABackBufferSurface(lpdds);
|
||||
|
||||
res = (*pReleaseS)(lpdds);
|
||||
|
||||
if(IsBack && bDontReleaseBackBuffer){
|
||||
OutTraceDDRAW("Release(S): SKIP RELEASE on lpdds=%x\n", lpdds);
|
||||
res = 0;
|
||||
}
|
||||
else
|
||||
res = (*pReleaseS)(lpdds);
|
||||
|
||||
OutTraceDDRAW("Release(S): lpdds=%x%s refcount=%d\n", lpdds, IsPrim?"(PRIM)":(IsBack?"(BACK)":""), res);
|
||||
if (res==0) { // common precondition
|
||||
|
@ -154,6 +154,47 @@ void OutTrace(const char *format, ...)
|
||||
fflush(fp);
|
||||
}
|
||||
|
||||
static BOOL CheckCompatibilityFlags()
|
||||
{
|
||||
typedef DWORD (WINAPI *GetFileVersionInfoSizeA_Type)(LPCSTR, LPDWORD);
|
||||
typedef BOOL (WINAPI *GetFileVersionInfoA_Type)(LPCSTR, DWORD, DWORD, LPVOID);
|
||||
typedef BOOL (WINAPI *VerQueryValueA_Type)(LPCVOID, LPCSTR, LPVOID, PUINT);
|
||||
VerQueryValueA_Type pVerQueryValueA;
|
||||
GetFileVersionInfoA_Type pGetFileVersionInfoA;
|
||||
GetFileVersionInfoSizeA_Type pGetFileVersionInfoSizeA;
|
||||
|
||||
HMODULE VersionLib;
|
||||
DWORD dwMajorVersion, dwMinorVersion;
|
||||
DWORD dwHandle = 0;
|
||||
int size;
|
||||
UINT len = 0;
|
||||
VS_FIXEDFILEINFO* vsfi = NULL;
|
||||
OSVERSIONINFO vi;
|
||||
|
||||
if(!(VersionLib=LoadLibrary("Version.dll"))) return FALSE;
|
||||
pGetFileVersionInfoA=(GetFileVersionInfoA_Type)GetProcAddress(VersionLib, "GetFileVersionInfoA");
|
||||
if(!pGetFileVersionInfoA) return FALSE;
|
||||
pGetFileVersionInfoSizeA=(GetFileVersionInfoSizeA_Type)GetProcAddress(VersionLib, "GetFileVersionInfoSizeA");
|
||||
if(!pGetFileVersionInfoSizeA) return FALSE;
|
||||
pVerQueryValueA=(VerQueryValueA_Type)GetProcAddress(VersionLib, "VerQueryValueA");
|
||||
if(!pVerQueryValueA) return FALSE;
|
||||
|
||||
size = (*pGetFileVersionInfoSizeA)("kernel32.dll", &dwHandle);
|
||||
BYTE* VersionInfo = new BYTE[size];
|
||||
(*pGetFileVersionInfoA)("kernel32.dll", dwHandle, size, VersionInfo);
|
||||
(*pVerQueryValueA)(VersionInfo, "\\", (void**)&vsfi, &len);
|
||||
dwMajorVersion=HIWORD(vsfi->dwProductVersionMS);
|
||||
dwMinorVersion=LOWORD(vsfi->dwProductVersionMS);
|
||||
delete[] VersionInfo;
|
||||
vi.dwOSVersionInfoSize=sizeof(vi);
|
||||
GetVersionExA(&vi);
|
||||
if((vi.dwMajorVersion!=dwMajorVersion) || (vi.dwMinorVersion!=dwMinorVersion)) {
|
||||
MessageBox(NULL, "Compatibility settings detected!", "DxWnd", MB_OK);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void dx_ToggleLogging()
|
||||
{
|
||||
// toggle LOGGING
|
||||
@ -1458,6 +1499,8 @@ void HookInit(TARGETMAP *target, HWND hwnd)
|
||||
OutTrace("HookInit: target window pos=(%d,%d) size=(%d,%d)\n", dxw.iPosX, dxw.iPosY, dxw.iSizX, dxw.iSizY);
|
||||
}
|
||||
|
||||
CheckCompatibilityFlags(); // v2.02.83 Check for change of OS release
|
||||
|
||||
HookSysLibsInit(); // this just once...
|
||||
|
||||
base=GetModuleHandle(NULL);
|
||||
|
@ -756,7 +756,7 @@ RECT dxwCore::GetWindowRect(RECT win)
|
||||
win.left = ((win.left - desk0.x) * (LONG)dwScreenWidth) / desktop.right;
|
||||
win.top = ((win.top - desk0.y) * (LONG)dwScreenHeight) / desktop.bottom;
|
||||
win.right = ((win.right - desk0.x) * (LONG)dwScreenWidth) / desktop.right;
|
||||
win.bottom = ((win.bottom - desk0.y) * (LONG)dwScreenWidth) / desktop.right;
|
||||
win.bottom = ((win.bottom - desk0.y) * (LONG)dwScreenHeight) / desktop.bottom;
|
||||
|
||||
return win;
|
||||
}
|
||||
|
@ -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.82"
|
||||
#define VERSION "2.02.83"
|
||||
|
||||
#define DDTHREADLOCK 1
|
||||
|
||||
|
Binary file not shown.
@ -759,16 +759,25 @@ HRESULT WINAPI extCreateDevice3(void *lpd3d, REFCLSID Guid, LPDIRECTDRAWSURFACE4
|
||||
|
||||
HRESULT WINAPI extCreateDevice7(void *lpd3d, REFCLSID Guid, LPDIRECTDRAWSURFACE7 lpdds, LPDIRECT3DDEVICE7 *lplpd3dd)
|
||||
{
|
||||
// v2.02.83: D3D CreateDevice (version 7? all versions?) internally calls the Release method upon th ebackbuffer
|
||||
// surface, and this has to be avoided since it causes a crash.
|
||||
// The bDontReleaseBackBuffer boolean tells extReleaseS NOT to perform an actual release operation.
|
||||
|
||||
HRESULT res;
|
||||
extern BOOL bDontReleaseBackBuffer;
|
||||
|
||||
OutTraceD3D("CreateDevice(D3D7): d3d=%x GUID=%x(%s) lpdds=%x\n", lpd3d, Guid.Data1, ExplainGUID((GUID *)&Guid), lpdds);
|
||||
bDontReleaseBackBuffer = TRUE;
|
||||
res=(*pCreateDevice7)(lpd3d, Guid, lpdds, lplpd3dd);
|
||||
bDontReleaseBackBuffer = FALSE;
|
||||
if(res) {
|
||||
OutTraceE("CreateDevice(D3D7) ERROR: err=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
if((dxw.dwFlags1 & AUTOMATIC) && (dxw.dwFlags1 & EMULATESURFACE)) {
|
||||
dxw.dwFlags1 &= ~EMULATESURFACE;
|
||||
dxw.dwFlags1 |= LOCKEDSURFACE;
|
||||
bDontReleaseBackBuffer = TRUE;
|
||||
res=(*pCreateDevice7)(lpd3d, Guid, lpdds, lplpd3dd);
|
||||
bDontReleaseBackBuffer = FALSE;
|
||||
}
|
||||
if (res) {
|
||||
OutTraceE("CreateDevice(D3D7) ERROR: err=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
|
@ -609,11 +609,10 @@ LONG WINAPI extSetWindowLong(HWND hwnd, int nIndex, LONG dwNewLong, SetWindowLon
|
||||
}
|
||||
|
||||
if (((nIndex==GWL_WNDPROC)||(nIndex==DWL_DLGPROC)) && dxw.IsFullScreen()){ // v2.02.51 - see A10 Cuba....
|
||||
//if (nIndex==GWL_WNDPROC){
|
||||
WNDPROC lres;
|
||||
WNDPROC OldProc;
|
||||
// GPL fix
|
||||
if(dxw.IsRealDesktop(hwnd)) {
|
||||
if(dxw.IsRealDesktop(hwnd) && dxw.Windowize) {
|
||||
hwnd=dxw.GethWnd();
|
||||
OutTraceDW("SetWindowLong: DESKTOP hwnd, FIXING hwnd=%x\n",hwnd);
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user