winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
September 2010
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
852 discussions
Start a n
N
ew thread
Alexandre Julliard : ntdll/tests: Fix the image protection test on Mac OS where the image limits are only approximative .
by Alexandre Julliard
15 Sep '10
15 Sep '10
Module: wine Branch: master Commit: e317b6068e8b9b303fe9e07df58306984477b73c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e317b6068e8b9b303fe9e07df…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Sep 15 10:58:00 2010 -0500 ntdll/tests: Fix the image protection test on Mac OS where the image limits are only approximative. --- dlls/ntdll/tests/info.c | 16 +++++++++++++--- 1 files changed, 13 insertions(+), 3 deletions(-) diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c index ffeb22a..ee3d0c6 100644 --- a/dlls/ntdll/tests/info.c +++ b/dlls/ntdll/tests/info.c @@ -1077,11 +1077,14 @@ static void test_queryvirtualmemory(void) static char rwtestbuf[42]; MEMORY_BASIC_INFORMATION mbi; char stackbuf[42]; + HMODULE module; trace("Check flags of a function entry in NTDLL.DLL at %p\n", pNtQueryVirtualMemory); + module = GetModuleHandle( "ntdll.dll" ); status = pNtQueryVirtualMemory(NtCurrentProcess(), pNtQueryVirtualMemory, MemoryBasicInformation, &mbi, sizeof(MEMORY_BASIC_INFORMATION), &readcount); ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); ok( readcount == sizeof(MEMORY_BASIC_INFORMATION), "Expected to read %d bytes, got %ld\n",(int)sizeof(MEMORY_BASIC_INFORMATION),readcount); + ok (mbi.AllocationBase == module, "mbi.AllocationBase is 0x%p, expected 0x%p\n", mbi.AllocationBase, module); ok (mbi.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "mbi.AllocationProtect is 0x%x, expected 0x%x\n", mbi.AllocationProtect, PAGE_EXECUTE_WRITECOPY); ok (mbi.State == MEM_COMMIT, "mbi.State is 0x%x, expected 0x%x\n", mbi.State, MEM_COMMIT); ok (mbi.Protect == PAGE_EXECUTE_READ, "mbi.Protect is 0x%x, expected 0x%x\n", mbi.Protect, PAGE_EXECUTE_READ); @@ -1105,9 +1108,11 @@ static void test_queryvirtualmemory(void) ok (mbi.Protect == PAGE_READWRITE, "mbi.Protect is 0x%x, expected 0x%x\n", mbi.Protect, PAGE_READWRITE); trace("Check flags of read-only data at %p\n", teststring); + module = GetModuleHandle( NULL ); status = pNtQueryVirtualMemory(NtCurrentProcess(), teststring, MemoryBasicInformation, &mbi, sizeof(MEMORY_BASIC_INFORMATION), &readcount); ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); ok( readcount == sizeof(MEMORY_BASIC_INFORMATION), "Expected to read %d bytes, got %ld\n",(int)sizeof(MEMORY_BASIC_INFORMATION),readcount); + ok (mbi.AllocationBase == module, "mbi.AllocationBase is 0x%p, expected 0x%p\n", mbi.AllocationBase, module); ok (mbi.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "mbi.AllocationProtect is 0x%x, expected 0x%x\n", mbi.AllocationProtect, PAGE_EXECUTE_WRITECOPY); ok (mbi.State == MEM_COMMIT, "mbi.State is 0x%x, expected 0x%X\n", mbi.State, MEM_COMMIT); if (mbi.Protect != PAGE_READONLY) @@ -1117,6 +1122,7 @@ static void test_queryvirtualmemory(void) status = pNtQueryVirtualMemory(NtCurrentProcess(), datatestbuf, MemoryBasicInformation, &mbi, sizeof(MEMORY_BASIC_INFORMATION), &readcount); ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); ok( readcount == sizeof(MEMORY_BASIC_INFORMATION), "Expected to read %d bytes, got %ld\n",(int)sizeof(MEMORY_BASIC_INFORMATION),readcount); + ok (mbi.AllocationBase == module, "mbi.AllocationBase is 0x%p, expected 0x%p\n", mbi.AllocationBase, module); ok (mbi.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "mbi.AllocationProtect is 0x%x, expected 0x%x\n", mbi.AllocationProtect, PAGE_EXECUTE_WRITECOPY); ok (mbi.State == MEM_COMMIT, "mbi.State is 0x%x, expected 0x%X\n", mbi.State, MEM_COMMIT); ok (mbi.Protect == PAGE_READWRITE, "mbi.Protect is 0x%x, expected 0x%X\n", mbi.Protect, PAGE_READWRITE); @@ -1125,9 +1131,13 @@ static void test_queryvirtualmemory(void) status = pNtQueryVirtualMemory(NtCurrentProcess(), rwtestbuf, MemoryBasicInformation, &mbi, sizeof(MEMORY_BASIC_INFORMATION), &readcount); ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); ok( readcount == sizeof(MEMORY_BASIC_INFORMATION), "Expected to read %d bytes, got %ld\n",(int)sizeof(MEMORY_BASIC_INFORMATION),readcount); - ok (mbi.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "mbi.AllocationProtect is 0x%x, expected 0x%x\n", mbi.AllocationProtect, PAGE_EXECUTE_WRITECOPY); - ok (mbi.State == MEM_COMMIT, "mbi.State is 0x%x, expected 0x%X\n", mbi.State, MEM_COMMIT); - ok (mbi.Protect == PAGE_READWRITE, "mbi.Protect is 0x%x, expected 0x%X\n", mbi.Protect, PAGE_READWRITE); + if (mbi.AllocationBase == module) + { + ok (mbi.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "mbi.AllocationProtect is 0x%x, expected 0x%x\n", mbi.AllocationProtect, PAGE_EXECUTE_WRITECOPY); + ok (mbi.State == MEM_COMMIT, "mbi.State is 0x%x, expected 0x%X\n", mbi.State, MEM_COMMIT); + ok (mbi.Protect == PAGE_READWRITE, "mbi.Protect is 0x%x, expected 0x%X\n", mbi.Protect, PAGE_READWRITE); + } + else skip( "bss is outside of module\n" ); /* this can happen on Mac OS */ } static void test_affinity(void)
1
0
0
0
Alexander Morozov : crypt32/tests: Add a test for CryptSignMessage.
by Alexandre Julliard
15 Sep '10
15 Sep '10
Module: wine Branch: master Commit: 665ede7517a8a1cabfd82dad09e28bda42951abf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=665ede7517a8a1cabfd82dad0…
Author: Alexander Morozov <amorozov(a)etersoft.ru> Date: Thu Jul 1 16:23:00 2010 +0400 crypt32/tests: Add a test for CryptSignMessage. --- dlls/crypt32/tests/message.c | 401 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 401 insertions(+), 0 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=665ede7517a8a1cabfd82…
1
0
0
0
Rudolf Mayerhofer : kernel32: Implement GetUserDefaultLocaleName using users default LCID.
by Alexandre Julliard
15 Sep '10
15 Sep '10
Module: wine Branch: master Commit: 2637bb9de7feacf2df5a8c1528bd22dab2920174 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2637bb9de7feacf2df5a8c152…
Author: Rudolf Mayerhofer <rm(a)eightyfive.net> Date: Wed Sep 15 11:08:20 2010 +0200 kernel32: Implement GetUserDefaultLocaleName using users default LCID. --- dlls/kernel32/locale.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c index 8d8042b..168bb19 100644 --- a/dlls/kernel32/locale.c +++ b/dlls/kernel32/locale.c @@ -3801,6 +3801,10 @@ INT WINAPI GetGeoInfoA(GEOID GeoId, GEOTYPE GeoType, LPSTR lpGeoData, INT WINAPI GetUserDefaultLocaleName(LPWSTR localename, int buffersize) { - FIXME("(%p, %d) stub!\n", localename, buffersize); - return 0; + LCID userlcid; + + TRACE("%p, %d\n", localename, buffersize); + + userlcid = GetUserDefaultLCID(); + return LCIDToLocaleName(userlcid, localename, buffersize, 0); }
1
0
0
0
Mariusz Pluciński : gameux/tests: Add verification of registry content for InstallGame and UninstallGame.
by Alexandre Julliard
15 Sep '10
15 Sep '10
Module: wine Branch: master Commit: c84cf4189c094a398a6a30c24005f6dce1ca7709 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c84cf4189c094a398a6a30c24…
Author: Mariusz Pluciński <vshader(a)gmail.com> Date: Wed Sep 15 01:21:37 2010 +0200 gameux/tests: Add verification of registry content for InstallGame and UninstallGame. --- dlls/gameux/tests/gameexplorer.c | 156 ++++++++++++++++++++++++++++++++++++-- 1 files changed, 148 insertions(+), 8 deletions(-) diff --git a/dlls/gameux/tests/gameexplorer.c b/dlls/gameux/tests/gameexplorer.c index 3a72d20..8553890 100644 --- a/dlls/gameux/tests/gameexplorer.c +++ b/dlls/gameux/tests/gameexplorer.c @@ -33,6 +33,9 @@ #include "wine/test.h" +/* function from Shell32, not defined in header */ +extern BOOL WINAPI GUIDFromStringW(LPCWSTR psz, LPGUID pguid); + /******************************************************************************* * Pointers used instead of direct calls. These procedures are not available on * older system, which causes problem while loading test binary. @@ -68,7 +71,8 @@ static BOOL _loadDynamicRoutines(void) * * Parameters: * installScope [I] the scope which was used in AddGame/InstallGame call - * gameInstanceId [I] game instance GUID + * gameInstanceId [I] game instance GUID. If NULL, then only + * path to scope is returned * lpRegistryPath [O] pointer which will receive address to string * containing expected registry path. Path * is relative to HKLM registry key. It @@ -138,14 +142,17 @@ static HRESULT _buildGameRegistryPath(GAME_INSTALL_SCOPE installScope, else hr = E_INVALIDARG; - /* put game's instance id on the end of path */ - if(SUCCEEDED(hr)) - hr = (StringFromGUID2(gameInstanceId, sInstanceId, sizeof(sInstanceId)/sizeof(sInstanceId[0])) ? S_OK : E_FAIL); - - if(SUCCEEDED(hr)) + /* put game's instance id on the end of path, but only if id was passes */ + if(gameInstanceId) { - lstrcatW(sRegistryPath, sBackslash); - lstrcatW(sRegistryPath, sInstanceId); + if(SUCCEEDED(hr)) + hr = (StringFromGUID2(gameInstanceId, sInstanceId, sizeof(sInstanceId)/sizeof(sInstanceId[0])) ? S_OK : E_FAIL); + + if(SUCCEEDED(hr)) + { + lstrcatW(sRegistryPath, sBackslash); + lstrcatW(sRegistryPath, sInstanceId); + } } if(SUCCEEDED(hr)) @@ -366,6 +373,128 @@ static void _validateGameRegistryKey(int line, } /******************************************************************************* + * _LoadRegistryString + * + * Helper function, loads string from registry value and allocates buffer for it + * + * Parameters: + * hRootKey [I] base key for reading. Should be opened + * with KEY_READ permission + * lpRegistryKey [I] name of registry key, subkey of root key + * lpRegistryValue [I] name of registry value + * lpValue [O] pointer where address of received + * value will be stored. Value should be + * freed by CoTaskMemFree call + */ +static HRESULT _LoadRegistryString(HKEY hRootKey, + LPCWSTR lpRegistryKey, + LPCWSTR lpRegistryValue, + LPWSTR* lpValue) +{ + HRESULT hr; + DWORD dwSize; + + *lpValue = NULL; + + hr = HRESULT_FROM_WIN32(_RegGetValueW(hRootKey, lpRegistryKey, lpRegistryValue, + RRF_RT_REG_SZ, NULL, NULL, &dwSize)); + + if(SUCCEEDED(hr)) + { + *lpValue = CoTaskMemAlloc(dwSize); + if(!*lpValue) + hr = E_OUTOFMEMORY; + } + if(SUCCEEDED(hr)) + hr = HRESULT_FROM_WIN32(_RegGetValueW(hRootKey, lpRegistryKey, lpRegistryValue, + RRF_RT_REG_SZ, NULL, *lpValue, &dwSize)); + + return hr; +} +/******************************************************************************* + * _findGameInstanceId + * + * Helper funtion. Searches for instance identifier of given game in given + * installation scope. + * + * Parameters: + * line [I] line to display messages + * sGDFBinaryPath [I] path to binary containing GDF + * installScope [I] game install scope to search in + * pInstanceId [O] instance identifier of given game + */ +static void _findGameInstanceId(int line, + LPWSTR sGDFBinaryPath, + GAME_INSTALL_SCOPE installScope, + GUID* pInstanceId) +{ + static const WCHAR sConfigGDFBinaryPath[] = + {'C','o','n','f','i','g','G','D','F','B','i','n','a','r','y','P','a','t','h',0}; + + HRESULT hr; + BOOL found = FALSE; + LPWSTR lpRegistryPath = NULL; + HKEY hRootKey; + DWORD dwSubKeys, dwSubKeyLen, dwMaxSubKeyLen, i; + LPWSTR lpName = NULL, lpValue = NULL; + + hr = _buildGameRegistryPath(installScope, NULL, &lpRegistryPath); + ok_(__FILE__, line)(SUCCEEDED(hr), "cannot get registry path to given scope: %d\n", installScope); + + if(SUCCEEDED(hr)) + /* enumerate all subkeys of received one and search them for value "ConfigGGDFBinaryPath" */ + hr = HRESULT_FROM_WIN32(RegOpenKeyExW(HKEY_LOCAL_MACHINE, + lpRegistryPath, 0, KEY_READ | KEY_WOW64_64KEY, &hRootKey)); + ok_(__FILE__, line)(SUCCEEDED(hr), "cannot open key registry key: %s\n", wine_dbgstr_w(lpRegistryPath)); + + if(SUCCEEDED(hr)) + { + hr = HRESULT_FROM_WIN32(RegQueryInfoKeyW(hRootKey, NULL, NULL, NULL, + &dwSubKeys, &dwMaxSubKeyLen, NULL, NULL, NULL, NULL, NULL, NULL)); + + if(SUCCEEDED(hr)) + { + ++dwMaxSubKeyLen; /* for string terminator */ + lpName = CoTaskMemAlloc(dwMaxSubKeyLen*sizeof(WCHAR)); + if(!lpName) hr = E_OUTOFMEMORY; + ok_(__FILE__, line)(SUCCEEDED(hr), "cannot allocate memory for key name"); + } + + if(SUCCEEDED(hr)) + { + for(i=0; i<dwSubKeys && !found; ++i) + { + dwSubKeyLen = dwMaxSubKeyLen; + hr = HRESULT_FROM_WIN32(RegEnumKeyExW(hRootKey, i, lpName, &dwSubKeyLen, + NULL, NULL, NULL, NULL)); + + if(SUCCEEDED(hr)) + hr = _LoadRegistryString(hRootKey, lpName, + sConfigGDFBinaryPath, &lpValue); + + if(SUCCEEDED(hr)) + if(lstrcmpW(lpValue, sGDFBinaryPath)==0) + { + /* key found, let's copy instance id and exit */ + hr = (GUIDFromStringW(lpName, pInstanceId) ? S_OK : E_FAIL); + ok(SUCCEEDED(hr), "cannot convert subkey to guid: %s\n", + wine_dbgstr_w(lpName)); + + found = TRUE; + } + CoTaskMemFree(lpValue); + } + } + + CoTaskMemFree(lpName); + RegCloseKey(hRootKey); + } + + CoTaskMemFree(lpRegistryPath); + todo_wine ok_(__FILE__, line)(found==TRUE, "cannot find game with GDF path %s in scope %d\n", + wine_dbgstr_w(sGDFBinaryPath), installScope); +} +/******************************************************************************* * Test routines */ static void test_create(BOOL* gameExplorerAvailable, BOOL* gameExplorer2Available) @@ -480,12 +609,16 @@ static void test_add_remove_game(void) } void test_install_uninstall_game(void) { + static const GUID applicationId = { 0x17A6558E, 0x60BE, 0x4078, + { 0xB6, 0x6F, 0x9C, 0x3A, 0xDA, 0x2A, 0x32, 0xE6 }}; + HRESULT hr; IGameExplorer2* ge2 = NULL; WCHAR sExeName[MAX_PATH]; WCHAR sExePath[MAX_PATH]; DWORD dwExeNameLen; + GUID guid; hr = CoCreateInstance(&CLSID_GameExplorer, NULL, CLSCTX_INPROC_SERVER, &IID_IGameExplorer2, (LPVOID*)&ge2); ok(ge2 != NULL, "cannot create coclass IGameExplorer2\n"); @@ -504,13 +637,20 @@ void test_install_uninstall_game(void) hr = IGameExplorer2_InstallGame(ge2, sExeName, sExePath, GIS_CURRENT_USER); todo_wine ok(SUCCEEDED(hr), "IGameExplorer2::InstallGame failed (error 0x%08x)\n", hr); + /* in comparision to AddGame, InstallGame does not return instance ID, + * so we need to find it manually */ + _findGameInstanceId(__LINE__, sExeName, GIS_CURRENT_USER, &guid); if(SUCCEEDED(hr)) { + todo_wine _validateGameRegistryKey(__LINE__, GIS_CURRENT_USER, &guid, &applicationId, sExePath, sExeName, TRUE); + hr = IGameExplorer2_UninstallGame(ge2, sExeName); todo_wine ok(SUCCEEDED(hr), "IGameExplorer2::UninstallGame failed (error 0x%08x)\n", hr); } + _validateGameRegistryKey(__LINE__, GIS_CURRENT_USER, &guid, &applicationId, sExePath, sExeName, FALSE); + IGameExplorer2_Release(ge2); } }
1
0
0
0
Mariusz Pluciński : gameux/tests: Add basic test for InstallGame and UninstallGame.
by Alexandre Julliard
15 Sep '10
15 Sep '10
Module: wine Branch: master Commit: 7c121d53aef1d6027c108f600dfcaf1fabb3f015 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7c121d53aef1d6027c108f600…
Author: Mariusz Pluciński <vshader(a)gmail.com> Date: Wed Sep 15 00:57:02 2010 +0200 gameux/tests: Add basic test for InstallGame and UninstallGame. --- dlls/gameux/tests/gameexplorer.c | 45 ++++++++++++++++++++++++++++++++++++- dlls/gameux/tests/test.gdf.xml | 9 +++++++ 2 files changed, 52 insertions(+), 2 deletions(-) diff --git a/dlls/gameux/tests/gameexplorer.c b/dlls/gameux/tests/gameexplorer.c index 3e86239..3a72d20 100644 --- a/dlls/gameux/tests/gameexplorer.c +++ b/dlls/gameux/tests/gameexplorer.c @@ -368,7 +368,7 @@ static void _validateGameRegistryKey(int line, /******************************************************************************* * Test routines */ -static void test_create(BOOL* gameExplorerAvailable) +static void test_create(BOOL* gameExplorerAvailable, BOOL* gameExplorer2Available) { HRESULT hr; @@ -391,6 +391,7 @@ static void test_create(BOOL* gameExplorerAvailable) if(ge2) { ok( hr == S_OK, "IGameExplorer2 creating failed (result false)\n"); + *gameExplorer2Available = TRUE; IGameExplorer2_Release(ge2); } else @@ -477,21 +478,61 @@ static void test_add_remove_game(void) IGameExplorer_Release(ge); } } +void test_install_uninstall_game(void) +{ + HRESULT hr; + + IGameExplorer2* ge2 = NULL; + WCHAR sExeName[MAX_PATH]; + WCHAR sExePath[MAX_PATH]; + DWORD dwExeNameLen; + + hr = CoCreateInstance(&CLSID_GameExplorer, NULL, CLSCTX_INPROC_SERVER, &IID_IGameExplorer2, (LPVOID*)&ge2); + ok(ge2 != NULL, "cannot create coclass IGameExplorer2\n"); + ok(hr == S_OK, "cannot create coclass IGameExplorer2\n"); + + if(ge2) + { + /* prepare path to binary */ + dwExeNameLen = GetModuleFileNameW(NULL, sExeName, sizeof (sExeName) / sizeof (sExeName[0])); + ok(dwExeNameLen != 0, "GetModuleFileNameW returned invalid value\n"); + lstrcpynW(sExePath, sExeName, StrRChrW(sExeName, NULL, '\\') - sExeName + 1); + + trace("prepared EXE name: %s\n", wine_dbgstr_w(sExeName)); + trace("prepared EXE path: %s\n", wine_dbgstr_w(sExePath)); + + + hr = IGameExplorer2_InstallGame(ge2, sExeName, sExePath, GIS_CURRENT_USER); + todo_wine ok(SUCCEEDED(hr), "IGameExplorer2::InstallGame failed (error 0x%08x)\n", hr); + + if(SUCCEEDED(hr)) + { + hr = IGameExplorer2_UninstallGame(ge2, sExeName); + todo_wine ok(SUCCEEDED(hr), "IGameExplorer2::UninstallGame failed (error 0x%08x)\n", hr); + } + + IGameExplorer2_Release(ge2); + } +} START_TEST(gameexplorer) { HRESULT r; BOOL gameExplorerAvailable = FALSE; + BOOL gameExplorer2Available = FALSE; if(_loadDynamicRoutines()) { r = CoInitialize( NULL ); ok( r == S_OK, "failed to init COM\n"); - test_create(&gameExplorerAvailable); + test_create(&gameExplorerAvailable, &gameExplorer2Available); if(gameExplorerAvailable) test_add_remove_game(); + + if(gameExplorer2Available) + test_install_uninstall_game(); } else /* this is not a failure, because both procedures loaded by address diff --git a/dlls/gameux/tests/test.gdf.xml b/dlls/gameux/tests/test.gdf.xml index 981abd3..c8959fc 100644 --- a/dlls/gameux/tests/test.gdf.xml +++ b/dlls/gameux/tests/test.gdf.xml @@ -27,5 +27,14 @@ xmlns="urn:schemas-microsoft-com:GameDescription.v1"> <Version> <VersionNumber versionNumber="1.0.0.0"/> </Version> + <ExtendedProperties> + <GameTasks> + <Play> + <Primary> + <FileTask path="gameux_crosstest.exe" arguments="" /> + </Primary> + </Play> + </GameTasks> + </ExtendedProperties> </GameDefinition> </GameDefinitionFile>
1
0
0
0
Mariusz Pluciński : gameux: IGameExplorer:: UpdateGame implementation.
by Alexandre Julliard
15 Sep '10
15 Sep '10
Module: wine Branch: master Commit: d02a6ab2b156ea84aeefc7f155acadb3d986d8fe URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d02a6ab2b156ea84aeefc7f15…
Author: Mariusz Pluciński <vshader(a)gmail.com> Date: Wed Sep 15 00:51:54 2010 +0200 gameux: IGameExplorer::UpdateGame implementation. --- dlls/gameux/gameexplorer.c | 143 +++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 141 insertions(+), 2 deletions(-) diff --git a/dlls/gameux/gameexplorer.c b/dlls/gameux/gameexplorer.c index aabadcd..2619857 100644 --- a/dlls/gameux/gameexplorer.c +++ b/dlls/gameux/gameexplorer.c @@ -110,6 +110,9 @@ static HRESULT GAMEUX_buildGameRegistryPath(GAME_INSTALL_SCOPE installScope, TRACE("(0x%x, %s, %p)\n", installScope, debugstr_guid(gameInstanceId), lpRegistryPath); + /* this will make freeing it easier for user */ + *lpRegistryPath = NULL; + lstrcpyW(sRegistryPath, sGameUxRegistryPath); lstrcatW(sRegistryPath, sBackslash); @@ -551,6 +554,143 @@ HRESULT WINAPI GAMEUX_RegisterGame(LPCWSTR sGDFBinaryPath, return hr; } /******************************************************************************* + * GAMEUX_IsGameKeyExist + * + * Helper function, checks if game's registry ath exists in given scope + * + * Parameters: + * installScope [I] scope to search game in + * InstanceID [I] game instance identifier + * lpRegistryPath [O] place to store address of registry path to + * the game. It is filled only if key exists. + * It must be freed by HeapFree(GetProcessHeap(), 0, ...) + * + * Returns: + * S_OK key was found properly + * S_FALSE key does not exists + * + */ +static HRESULT GAMEUX_IsGameKeyExist(GAME_INSTALL_SCOPE installScope, + LPCGUID InstanceID, + LPWSTR* lpRegistryPath) { + + HRESULT hr; + HKEY hKey; + + hr = GAMEUX_buildGameRegistryPath(installScope, InstanceID, lpRegistryPath); + + if(SUCCEEDED(hr)) + hr = HRESULT_FROM_WIN32(RegOpenKeyExW(HKEY_LOCAL_MACHINE, *lpRegistryPath, + 0, KEY_WOW64_64KEY, &hKey)); + + if(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)) + hr = S_FALSE; + + if(hr == S_OK) + RegCloseKey(hKey); + else + { + /* if key does not exist or other error occured, do not return the path */ + HeapFree(GetProcessHeap(), 0, *lpRegistryPath); + *lpRegistryPath = NULL; + } + + return hr; +} +/******************************************************************************* + * GAMEUX_LoadRegistryString + * + * Helper function, loads string from registry value and allocates buffer for it + */ +static HRESULT GAMEUX_LoadRegistryString(HKEY hRootKey, + LPCWSTR lpRegistryKey, + LPCWSTR lpRegistryValue, + LPWSTR* lpValue) +{ + HRESULT hr; + DWORD dwSize; + + *lpValue = NULL; + + hr = HRESULT_FROM_WIN32(RegGetValueW(hRootKey, lpRegistryKey, lpRegistryValue, + RRF_RT_REG_SZ, NULL, NULL, &dwSize)); + + if(SUCCEEDED(hr)) + { + *lpValue = HeapAlloc(GetProcessHeap(), 0, dwSize); + if(!*lpValue) + hr = E_OUTOFMEMORY; + } + + if(SUCCEEDED(hr)) + hr = HRESULT_FROM_WIN32(RegGetValueW(hRootKey, lpRegistryKey, lpRegistryValue, + RRF_RT_REG_SZ, NULL, *lpValue, &dwSize)); + + return hr; +} +/******************************************************************************* + * GAMEUX_UpdateGame + * + * Helper function, updates stored data about game with given InstanceID + */ +static HRESULT GAMEUX_UpdateGame(LPGUID InstanceID) { + static const WCHAR sConfigGDFBinaryPath[] = {'C','o','n','f','i','g','G','D','F','B','i','n','a','r','y','P','a','t','h',0}; + static const WCHAR sConfigApplicationPath[] = {'C','o','n','f','i','g','A','p','p','l','i','c','a','t','i','o','n','P','a','t','h',0}; + + HRESULT hr; + GAME_INSTALL_SCOPE installScope; + LPWSTR lpRegistryPath; + LPWSTR lpGDFBinaryPath, lpGameInstallDirectory; + + TRACE("(%p)\n", debugstr_guid(InstanceID)); + + /* first, check is game exists in CURRENT_USER scope */ + installScope = GIS_CURRENT_USER; + hr = GAMEUX_IsGameKeyExist(installScope, InstanceID, &lpRegistryPath); + + if(hr == S_FALSE) + { + /* game not found in CURRENT_USER scope, let's check in ALL_USERS */ + installScope = GIS_ALL_USERS; + hr = GAMEUX_IsGameKeyExist(installScope, InstanceID, &lpRegistryPath); + } + + if(hr == S_FALSE) + /* still not found? let's inform user that game does not exists */ + hr = HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); + + if(SUCCEEDED(hr)) + { + /* game found, it's registry path is in lpRegistryPath and install + * scope in installScope */ + TRACE("game found in registry (path %s), updating\n", debugstr_w(lpRegistryPath)); + + /* first, read required data about game */ + hr = GAMEUX_LoadRegistryString(HKEY_LOCAL_MACHINE, lpRegistryPath, + sConfigGDFBinaryPath, &lpGDFBinaryPath); + + if(SUCCEEDED(hr)) + hr = GAMEUX_LoadRegistryString(HKEY_LOCAL_MACHINE, lpRegistryPath, + sConfigApplicationPath, &lpGameInstallDirectory); + + /* now remove currently existing registry key */ + if(SUCCEEDED(hr)) + hr = GAMEUX_RemoveRegistryRecord(InstanceID); + + /* and add it again, it will cause in reparsing of whole GDF */ + if(SUCCEEDED(hr)) + hr = GAMEUX_RegisterGame(lpGDFBinaryPath, lpGameInstallDirectory, + installScope, InstanceID); + + HeapFree(GetProcessHeap(), 0, lpGDFBinaryPath); + HeapFree(GetProcessHeap(), 0, lpGameInstallDirectory); + } + + HeapFree(GetProcessHeap(), 0, lpRegistryPath); + TRACE("returning 0x%x\n", hr); + return hr; +} +/******************************************************************************* * GameExplorer implementation */ @@ -668,8 +808,7 @@ static HRESULT WINAPI GameExplorerImpl_UpdateGame( GameExplorerImpl *This = impl_from_IGameExplorer(iface); TRACE("(%p, %s)\n", This, debugstr_guid(&instanceID)); - FIXME("stub\n"); - return E_NOTIMPL; + return GAMEUX_UpdateGame(&instanceID); } static HRESULT WINAPI GameExplorerImpl_VerifyAccess(
1
0
0
0
Paul Vriens : msxml3/tests: Step to the next item on failure as well.
by Alexandre Julliard
15 Sep '10
15 Sep '10
Module: wine Branch: master Commit: 14316fc17f1c6d5da95aa55a952342a3c74112b3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=14316fc17f1c6d5da95aa55a9…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Wed Sep 15 16:39:25 2010 +0200 msxml3/tests: Step to the next item on failure as well. --- dlls/msxml3/tests/domdoc.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index 0ed8f33..0a50ca0 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -5647,6 +5647,7 @@ static void test_default_properties(void) if (hr != S_OK) { win_skip("can't create %s instance\n", entry->clsid); + entry++; continue; }
1
0
0
0
Hwang YunSong : shell32: Update Korean resource.
by Alexandre Julliard
15 Sep '10
15 Sep '10
Module: wine Branch: master Commit: 44fb3c393dd9a8cfee913b85018cbf9e776acd7a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=44fb3c393dd9a8cfee913b850…
Author: Hwang YunSong <hys545(a)dreamwiz.com> Date: Wed Sep 15 17:46:25 2010 +0900 shell32: Update Korean resource. --- dlls/shell32/shell32_Ko.rc | 292 ++++++++++++++++++++++++-------------------- 1 files changed, 157 insertions(+), 135 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=44fb3c393dd9a8cfee913…
1
0
0
0
Luca Bennati : shell32: Update Italian translation.
by Alexandre Julliard
15 Sep '10
15 Sep '10
Module: wine Branch: master Commit: d6e7d44e5086e2ac38724326bbc7b23ba74b9a4c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d6e7d44e5086e2ac38724326b…
Author: Luca Bennati <lucak3(a)gmail.com> Date: Wed Sep 15 09:10:11 2010 +0200 shell32: Update Italian translation. --- dlls/shell32/shell32_It.rc | 24 +++++++++++++++++++++--- 1 files changed, 21 insertions(+), 3 deletions(-) diff --git a/dlls/shell32/shell32_It.rc b/dlls/shell32/shell32_It.rc index a4db90a..7ce3e66 100644 --- a/dlls/shell32/shell32_It.rc +++ b/dlls/shell32/shell32_It.rc @@ -258,7 +258,7 @@ STRINGTABLE IDS_RUNDLG_ERROR "Impossibile mostrare la finestra Esegui File (errore interno)" IDS_RUNDLG_BROWSE_ERROR "Impossibile mostrare la finestra Sfoglia (errore interno)" IDS_RUNDLG_BROWSE_CAPTION "Sfoglia" - IDS_RUNDLG_BROWSE_FILTER "File eseguibili\0*.exe\0Tutti i files\0*.*\0\0" + IDS_RUNDLG_BROWSE_FILTER "File eseguibili\0*.exe\0Tutti i file\0*.*\0\0" /* shell folder path default values */ IDS_STARTMENU "Start Menu" @@ -290,10 +290,28 @@ STRINGTABLE IDS_APPDATA "Applicazioni" IDS_PRINTHOOD "Stampanti condivise" IDS_COOKIES "Cookie" + IDS_CONTACTS "Contatti" + IDS_LINKS "Collegamenti" + IDS_PHOTO_ALBUMS "Immagini\\Slide Shows" + IDS_PLAYLISTS "Musica\\Playlists" + IDS_PUBLIC_DOWNLOADS "Download" + IDS_PUBLIC_GAME_TASKS "Microsoft\\Windows\\GameExplorer" + IDS_PUBLIC_LIBRARIES "Microsoft\\Windows\\Librerie" + IDS_PUBLIC_RINGTONES "Microsoft\\Windows\\Suonerie" + IDS_SAMPLE_MUSIC "Musica\\Sample Music" + IDS_SAMPLE_PICTURES "Immagini\\Sample Pictures" + IDS_SAMPLE_PLAYLISTS "Musica\\Sample Playlists" + IDS_SAMPLE_VIDEOS "Video\\Sample Videos" + IDS_SAVED_GAMES "Giochi salvati" + IDS_SAVED_SEARCHES "Ricerche" + IDS_USER_PROFILES "Utenti" + IDS_COMMON_OEM_LINKS "Collegamenti OEM" + IDS_DOCUMENTS "Documenti" + IDS_DOWNLOADS "Download" - IDS_NEWFOLDER "Nuova cartella" + IDS_NEWFOLDER "Nuova cartella" - IDS_CPANEL_TITLE "Pannello di Controllo di Wine" + IDS_CPANEL_TITLE "Pannello di controllo di Wine" IDS_CPANEL_NAME "Nome" IDS_CPANEL_DESCRIPTION "Descrizione"
1
0
0
0
Henri Verbeet : wined3d: Move the viewport to wined3d_state.
by Alexandre Julliard
15 Sep '10
15 Sep '10
Module: wine Branch: master Commit: 16d9c91b97745916eb3afc10f15f20681394fe62 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=16d9c91b97745916eb3afc10f…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Sep 15 12:00:06 2010 +0200 wined3d: Move the viewport to wined3d_state. --- dlls/wined3d/device.c | 22 +++++++++++----------- dlls/wined3d/state.c | 22 +++++++++++----------- dlls/wined3d/stateblock.c | 8 ++++---- dlls/wined3d/wined3d_private.h | 4 +--- 4 files changed, 27 insertions(+), 29 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 3bf1eac..15df5ab 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -561,7 +561,7 @@ void device_context_remove(IWineD3DDeviceImpl *device, struct wined3d_context *c void device_get_draw_rect(IWineD3DDeviceImpl *device, RECT *rect) { IWineD3DStateBlockImpl *stateblock = device->stateBlock; - WINED3DVIEWPORT *vp = &stateblock->viewport; + WINED3DVIEWPORT *vp = &stateblock->state.viewport; SetRect(rect, vp->X, vp->Y, vp->X + vp->Width, vp->Y + vp->Height); @@ -2998,7 +2998,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetViewport(IWineD3DDevice *iface, CONS TRACE("(%p)\n", This); This->updateStateBlock->changed.viewport = TRUE; - This->updateStateBlock->viewport = *pViewport; + This->updateStateBlock->state.viewport = *pViewport; /* Handle recording of state blocks */ if (This->isRecordingState) { @@ -3017,7 +3017,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetViewport(IWineD3DDevice *iface, CONS static HRESULT WINAPI IWineD3DDeviceImpl_GetViewport(IWineD3DDevice *iface, WINED3DVIEWPORT* pViewport) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; TRACE("(%p)\n", This); - *pViewport = This->stateBlock->viewport; + *pViewport = This->stateBlock->state.viewport; return WINED3D_OK; } @@ -5752,18 +5752,18 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderTarget(IWineD3DDevice *iface, /* Set the viewport and scissor rectangles, if requested. Tests show * that stateblock recording is ignored, the change goes directly * into the primary stateblock. */ - device->stateBlock->viewport.Height = device->render_targets[0]->currentDesc.Height; - device->stateBlock->viewport.Width = device->render_targets[0]->currentDesc.Width; - device->stateBlock->viewport.X = 0; - device->stateBlock->viewport.Y = 0; - device->stateBlock->viewport.MaxZ = 1.0f; - device->stateBlock->viewport.MinZ = 0.0f; + device->stateBlock->state.viewport.Height = device->render_targets[0]->currentDesc.Height; + device->stateBlock->state.viewport.Width = device->render_targets[0]->currentDesc.Width; + device->stateBlock->state.viewport.X = 0; + device->stateBlock->state.viewport.Y = 0; + device->stateBlock->state.viewport.MaxZ = 1.0f; + device->stateBlock->state.viewport.MinZ = 0.0f; IWineD3DDeviceImpl_MarkStateDirty(device, STATE_VIEWPORT); device->stateBlock->state.scissor_rect.top = 0; device->stateBlock->state.scissor_rect.left = 0; - device->stateBlock->state.scissor_rect.right = device->stateBlock->viewport.Width; - device->stateBlock->state.scissor_rect.bottom = device->stateBlock->viewport.Height; + device->stateBlock->state.scissor_rect.right = device->stateBlock->state.viewport.Width; + device->stateBlock->state.scissor_rect.bottom = device->stateBlock->state.viewport.Height; IWineD3DDeviceImpl_MarkStateDirty(device, STATE_SCISSORRECT); } diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index ebd89b3..50447b8 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -1516,7 +1516,7 @@ static void state_pscale(DWORD state, IWineD3DStateBlockImpl *stateblock, struct if (stateblock->state.render_states[WINED3DRS_POINTSCALEENABLE]) { GLfloat scaleFactor; - DWORD h = stateblock->viewport.Height; + DWORD h = stateblock->state.viewport.Height; if (pointSize.f < gl_info->limits.pointsize_min) { @@ -3943,10 +3943,10 @@ static void transform_projection(DWORD state, IWineD3DStateBlockImpl *stateblock if (context->last_was_rhw) { - double x = stateblock->viewport.X; - double y = stateblock->viewport.Y; - double w = stateblock->viewport.Width; - double h = stateblock->viewport.Height; + double x = stateblock->state.viewport.X; + double y = stateblock->state.viewport.Y; + double w = stateblock->state.viewport.Width; + double h = stateblock->state.viewport.Height; TRACE("Calling glOrtho with x %.8e, y %.8e, w %.8e, h %.8e.\n", x, y, w, h); if (context->render_offscreen) @@ -4010,8 +4010,8 @@ static void transform_projection(DWORD state, IWineD3DStateBlockImpl *stateblock * filling convention. We want the difference to be large enough that * it doesn't get lost due to rounding inside the driver, but small * enough to prevent it from interfering with any anti-aliasing. */ - GLfloat xoffset = (63.0f / 64.0f) / stateblock->viewport.Width; - GLfloat yoffset = -(63.0f / 64.0f) / stateblock->viewport.Height; + GLfloat xoffset = (63.0f / 64.0f) / stateblock->state.viewport.Width; + GLfloat yoffset = -(63.0f / 64.0f) / stateblock->state.viewport.Height; if (context->render_offscreen) { @@ -4597,7 +4597,7 @@ static void vertexdeclaration(DWORD state, IWineD3DStateBlockImpl *stateblock, s */ if (useVertexShaderFunction) { - GLfloat yoffset = -(63.0f / 64.0f) / stateblock->viewport.Height; + GLfloat yoffset = -(63.0f / 64.0f) / stateblock->state.viewport.Height; device->posFixup[1] = context->render_offscreen ? -1.0f : 1.0f; device->posFixup[3] = device->posFixup[1] * yoffset; } @@ -4723,7 +4723,7 @@ static void viewport_miscpart(DWORD state, IWineD3DStateBlockImpl *stateblock, s { IWineD3DSurfaceImpl *target = stateblock->device->render_targets[0]; UINT width, height; - WINED3DVIEWPORT vp = stateblock->viewport; + WINED3DVIEWPORT vp = stateblock->state.viewport; if(vp.Width > target->currentDesc.Width) vp.Width = target->currentDesc.Width; if(vp.Height > target->currentDesc.Height) vp.Height = target->currentDesc.Height; @@ -4748,9 +4748,9 @@ static void viewport_miscpart(DWORD state, IWineD3DStateBlockImpl *stateblock, s static void viewport_vertexpart(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) { - GLfloat yoffset = -(63.0f / 64.0f) / stateblock->viewport.Height; + GLfloat yoffset = -(63.0f / 64.0f) / stateblock->state.viewport.Height; - stateblock->device->posFixup[2] = (63.0f / 64.0f) / stateblock->viewport.Width; + stateblock->device->posFixup[2] = (63.0f / 64.0f) / stateblock->state.viewport.Width; stateblock->device->posFixup[3] = stateblock->device->posFixup[1] * yoffset; if(!isStateDirty(context, STATE_TRANSFORM(WINED3DTS_PROJECTION))) { diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index 3f20ae5..5a6d58e 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -747,12 +747,12 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface) This->material = targetStateBlock->material; } - if (This->changed.viewport - && memcmp(&targetStateBlock->viewport, &This->viewport, sizeof(This->viewport))) + if (This->changed.viewport && memcmp(&targetStateBlock->state.viewport, + &This->state.viewport, sizeof(This->state.viewport))) { TRACE("Updating viewport.\n"); - This->viewport = targetStateBlock->viewport; + This->state.viewport = targetStateBlock->state.viewport; } if (This->changed.scissorRect && memcmp(&targetStateBlock->state.scissor_rect, @@ -995,7 +995,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface) if (This->changed.viewport) { - IWineD3DDevice_SetViewport(device, &This->viewport); + IWineD3DDevice_SetViewport(device, &This->state.viewport); } if (This->changed.scissorRect) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index ed8ea55..49e741a 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2349,6 +2349,7 @@ struct wined3d_stream_state struct wined3d_state { + WINED3DVIEWPORT viewport; RECT scissor_rect; DWORD render_states[WINEHIGHEST_RENDER_STATE + 1]; @@ -2404,9 +2405,6 @@ struct IWineD3DStateBlockImpl double clipplane[MAX_CLIPPLANES][4]; WINED3DCLIPSTATUS clip_status; - /* ViewPort */ - WINED3DVIEWPORT viewport; - /* Material */ WINED3DMATERIAL material;
1
0
0
0
← Newer
1
...
49
50
51
52
53
54
55
...
86
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
Results per page:
10
25
50
100
200