ReactOS.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
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
List overview
Download
Ros-diffs
April 2019
----- 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
ros-diffs@reactos.org
32 participants
240 discussions
Start a n
N
ew thread
[reactos] 01/01: [MSPAINT] Set default extension .bmp (#1515)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f2512254e00d38d7de636…
commit f2512254e00d38d7de63661eec1ca706c1efebe5 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Tue Apr 23 14:25:18 2019 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Tue Apr 23 14:25:18 2019 +0900 [MSPAINT] Set default extension .bmp (#1515) Set the default extension of mspaint to .bmp. CORE-7114 --- base/applications/mspaint/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/base/applications/mspaint/main.cpp b/base/applications/mspaint/main.cpp index 8abe4ffa41..6b0d512cf4 100644 --- a/base/applications/mspaint/main.cpp +++ b/base/applications/mspaint/main.cpp @@ -355,6 +355,7 @@ _tWinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPTSTR lpszArgument ofn.lpstrFileTitle = ofnFiletitle; ofn.nMaxFileTitle = SIZEOF(ofnFiletitle); ofn.Flags = OFN_HIDEREADONLY; + ofn.lpstrDefExt = L"bmp"; CopyMemory(sfnFilename, filepathname, sizeof(filepathname)); CString strExporters; @@ -371,6 +372,7 @@ _tWinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPTSTR lpszArgument sfn.nMaxFileTitle = SIZEOF(sfnFiletitle); sfn.Flags = OFN_OVERWRITEPROMPT | OFN_HIDEREADONLY | OFN_EXPLORER | OFN_ENABLEHOOK; sfn.lpfnHook = OFNHookProc; + sfn.lpstrDefExt = L"bmp"; /* creating the size boxes */ RECT sizeboxPos = {0, 0, 0 + 3, 0 + 3};
5 years, 8 months
1
0
0
0
[reactos] 02/02: [STOBJECT] Store the "Show x icon in the taskbar" setting for the hotplug, power and volume icons.
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8c30fdab1c42af81800e2…
commit 8c30fdab1c42af81800e2ba7b68845192a9cae92 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Tue Apr 23 00:12:23 2019 +0200 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Tue Apr 23 00:12:23 2019 +0200 [STOBJECT] Store the "Show x icon in the taskbar" setting for the hotplug, power and volume icons. CORE-12365 CORE-12972 CORE-15234 --- dll/shellext/stobject/csystray.cpp | 99 +++++++++++++++++++++++++++++++++----- dll/shellext/stobject/csystray.h | 6 +++ dll/shellext/stobject/hotplug.cpp | 18 ++++--- dll/shellext/stobject/power.cpp | 17 ++++--- dll/shellext/stobject/precomp.h | 5 ++ dll/shellext/stobject/volume.cpp | 19 ++++---- 6 files changed, 128 insertions(+), 36 deletions(-) diff --git a/dll/shellext/stobject/csystray.cpp b/dll/shellext/stobject/csystray.cpp index d73e67e55d..136927896b 100644 --- a/dll/shellext/stobject/csystray.cpp +++ b/dll/shellext/stobject/csystray.cpp @@ -13,15 +13,80 @@ #include <shellutils.h> SysTrayIconHandlers_t g_IconHandlers [] = { - { Volume_Init, Volume_Shutdown, Volume_Update, Volume_Message }, - { Hotplug_Init, Hotplug_Shutdown, Hotplug_Update, Hotplug_Message }, - { Power_Init, Power_Shutdown, Power_Update, Power_Message } + { VOLUME_SERVICE_FLAG, Volume_Init, Volume_Shutdown, Volume_Update, Volume_Message }, + { HOTPLUG_SERVICE_FLAG, Hotplug_Init, Hotplug_Shutdown, Hotplug_Update, Hotplug_Message }, + { POWER_SERVICE_FLAG, Power_Init, Power_Shutdown, Power_Update, Power_Message } }; const int g_NumIcons = _countof(g_IconHandlers); CSysTray::CSysTray() {} CSysTray::~CSysTray() {} +VOID CSysTray::GetServicesEnabled() +{ + HKEY hKey; + DWORD dwSize; + + /* Enable power and volume by default */ + this->dwServicesEnabled = POWER_SERVICE_FLAG | VOLUME_SERVICE_FLAG; + + if (RegCreateKeyExW(HKEY_CURRENT_USER, + L"Software\\Microsoft\\Windows\\CurrentVersion\\Applets\\SysTray", + 0, + NULL, + REG_OPTION_NON_VOLATILE, + KEY_READ, + NULL, + &hKey, + NULL) == ERROR_SUCCESS) + { + dwSize = sizeof(DWORD); + RegQueryValueExW(hKey, + L"Services", + NULL, + NULL, + (LPBYTE)&this->dwServicesEnabled, + &dwSize); + + RegCloseKey(hKey); + } +} + +VOID CSysTray::EnableService(DWORD dwServiceFlag, BOOL bEnable) +{ + HKEY hKey; + + if (bEnable) + this->dwServicesEnabled |= dwServiceFlag; + else + this->dwServicesEnabled &= ~dwServiceFlag; + + if (RegCreateKeyExW(HKEY_CURRENT_USER, + L"Software\\Microsoft\\Windows\\CurrentVersion\\Applets\\SysTray", + 0, + NULL, + REG_OPTION_NON_VOLATILE, + KEY_WRITE, + NULL, + &hKey, + NULL) == ERROR_SUCCESS) + { + RegSetValueExW(hKey, + L"Services", + 0, + REG_DWORD, + (LPBYTE)&this->dwServicesEnabled, + sizeof(DWORD)); + + RegCloseKey(hKey); + } +} + +BOOL CSysTray::IsServiceEnabled(DWORD dwServiceFlag) +{ + return (this->dwServicesEnabled & dwServiceFlag); +} + HRESULT CSysTray::InitNetShell() { HRESULT hr = CoCreateInstance(CLSID_ConnectionTray, 0, 1u, IID_PPV_ARG(IOleCommandTarget, &pctNetShell)); @@ -49,9 +114,12 @@ HRESULT CSysTray::InitIcons() TRACE("Initializing Notification icons...\n"); for (int i = 0; i < g_NumIcons; i++) { - HRESULT hr = g_IconHandlers[i].pfnInit(this); - if (FAILED(hr)) - return hr; + if (this->dwServicesEnabled & g_IconHandlers[i].dwServiceFlag) + { + HRESULT hr = g_IconHandlers[i].pfnInit(this); + if (FAILED(hr)) + return hr; + } } return InitNetShell(); @@ -62,9 +130,12 @@ HRESULT CSysTray::ShutdownIcons() TRACE("Shutting down Notification icons...\n"); for (int i = 0; i < g_NumIcons; i++) { - HRESULT hr = g_IconHandlers[i].pfnShutdown(this); - if (FAILED(hr)) - return hr; + if (this->dwServicesEnabled & g_IconHandlers[i].dwServiceFlag) + { + HRESULT hr = g_IconHandlers[i].pfnShutdown(this); + if (FAILED(hr)) + return hr; + } } return ShutdownNetShell(); @@ -75,9 +146,12 @@ HRESULT CSysTray::UpdateIcons() TRACE("Updating Notification icons...\n"); for (int i = 0; i < g_NumIcons; i++) { - HRESULT hr = g_IconHandlers[i].pfnUpdate(this); - if (FAILED(hr)) - return hr; + if (this->dwServicesEnabled & g_IconHandlers[i].dwServiceFlag) + { + HRESULT hr = g_IconHandlers[i].pfnUpdate(this); + if (FAILED(hr)) + return hr; + } } return S_OK; @@ -236,6 +310,7 @@ BOOL CSysTray::ProcessWindowMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM return FALSE; case WM_CREATE: + GetServicesEnabled(); InitIcons(); SetTimer(1, 2000, NULL); return TRUE; diff --git a/dll/shellext/stobject/csystray.h b/dll/shellext/stobject/csystray.h index 214a4c6549..0ff5236782 100644 --- a/dll/shellext/stobject/csystray.h +++ b/dll/shellext/stobject/csystray.h @@ -28,6 +28,7 @@ class CSysTray : // TODO: keep icon handlers here + DWORD dwServicesEnabled; HWND hwndSysTray; static DWORD WINAPI s_SysTrayThreadProc(PVOID param); @@ -44,11 +45,16 @@ class CSysTray : HRESULT InitNetShell(); HRESULT ShutdownNetShell(); + VOID GetServicesEnabled(); + public: HRESULT NotifyIcon(INT code, UINT uId, HICON hIcon, LPCWSTR szTip, DWORD dwstate = 0); HWND GetHWnd() { return m_hWnd; } + VOID EnableService(DWORD dwServiceFlag, BOOL bEnable); + BOOL IsServiceEnabled(DWORD dwServiceFlag); + protected: BOOL ProcessWindowMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult, DWORD dwMsgMapID = 0); diff --git a/dll/shellext/stobject/hotplug.cpp b/dll/shellext/stobject/hotplug.cpp index af7d69891b..03348f92d2 100644 --- a/dll/shellext/stobject/hotplug.cpp +++ b/dll/shellext/stobject/hotplug.cpp @@ -22,7 +22,6 @@ CSimpleArray<DEVINST> g_devList; static HICON g_hIconHotplug = NULL; static LPCWSTR g_strTooltip = L"Safely Remove Hardware and Eject Media"; static WCHAR g_strMenuSel[DISPLAY_NAME_LEN]; -static BOOL g_IsRunning = FALSE; static BOOL g_IsRemoving = FALSE; /*++ @@ -132,7 +131,6 @@ HRESULT STDMETHODCALLTYPE Hotplug_Init(_In_ CSysTray * pSysTray) { TRACE("Hotplug_Init\n"); g_hIconHotplug = LoadIcon(g_hInstance, MAKEINTRESOURCE(IDI_HOTPLUG_OK)); - g_IsRunning = TRUE; EnumHotpluggedDevices(g_devList); return pSysTray->NotifyIcon(NIM_ADD, ID_ICON_HOTPLUG, g_hIconHotplug, g_strTooltip, NIS_HIDDEN); @@ -152,8 +150,6 @@ HRESULT STDMETHODCALLTYPE Hotplug_Shutdown(_In_ CSysTray * pSysTray) { TRACE("Hotplug_Shutdown\n"); - g_IsRunning = FALSE; - return pSysTray->NotifyIcon(NIM_DELETE, ID_ICON_HOTPLUG, NULL, NULL); } @@ -263,20 +259,26 @@ HRESULT STDMETHODCALLTYPE Hotplug_Message(_In_ CSysTray * pSysTray, UINT uMsg, W case WM_USER + 220: TRACE("Hotplug_Message: WM_USER+220\n"); - if (wParam == 1) + if (wParam == HOTPLUG_SERVICE_FLAG) { - if (lParam == FALSE) + if (lParam) + { + pSysTray->EnableService(HOTPLUG_SERVICE_FLAG, TRUE); return Hotplug_Init(pSysTray); + } else + { + pSysTray->EnableService(HOTPLUG_SERVICE_FLAG, FALSE); return Hotplug_Shutdown(pSysTray); + } } return S_FALSE; case WM_USER + 221: TRACE("Hotplug_Message: WM_USER+221\n"); - if (wParam == 1) + if (wParam == HOTPLUG_SERVICE_FLAG) { - lResult = (LRESULT)g_IsRunning; + lResult = (LRESULT)pSysTray->IsServiceEnabled(HOTPLUG_SERVICE_FLAG); return S_OK; } return S_FALSE; diff --git a/dll/shellext/stobject/power.cpp b/dll/shellext/stobject/power.cpp index 6cb16fdbc9..932dc47dea 100644 --- a/dll/shellext/stobject/power.cpp +++ b/dll/shellext/stobject/power.cpp @@ -28,7 +28,6 @@ typedef struct _PWRSCHEMECONTEXT CString g_strTooltip; static HICON g_hIconBattery = NULL; -static BOOL g_IsRunning = FALSE; /*++ @@ -117,7 +116,6 @@ HRESULT STDMETHODCALLTYPE Power_Init(_In_ CSysTray * pSysTray) { TRACE("Power_Init\n"); g_hIconBattery = DynamicLoadIcon(g_hInstance); - g_IsRunning = TRUE; return pSysTray->NotifyIcon(NIM_ADD, ID_ICON_POWER, g_hIconBattery, g_strTooltip); } @@ -133,7 +131,6 @@ HRESULT STDMETHODCALLTYPE Power_Update(_In_ CSysTray * pSysTray) HRESULT STDMETHODCALLTYPE Power_Shutdown(_In_ CSysTray * pSysTray) { TRACE("Power_Shutdown\n"); - g_IsRunning = FALSE; return pSysTray->NotifyIcon(NIM_DELETE, ID_ICON_POWER, NULL, NULL); } @@ -238,20 +235,26 @@ HRESULT STDMETHODCALLTYPE Power_Message(_In_ CSysTray * pSysTray, UINT uMsg, WPA { case WM_USER + 220: TRACE("Power_Message: WM_USER+220\n"); - if (wParam == 1) + if (wParam == POWER_SERVICE_FLAG) { - if (lParam == FALSE) + if (lParam) + { + pSysTray->EnableService(POWER_SERVICE_FLAG, TRUE); return Power_Init(pSysTray); + } else + { + pSysTray->EnableService(POWER_SERVICE_FLAG, FALSE); return Power_Shutdown(pSysTray); + } } return S_FALSE; case WM_USER + 221: TRACE("Power_Message: WM_USER+221\n"); - if (wParam == 1) + if (wParam == POWER_SERVICE_FLAG) { - lResult = (LRESULT)g_IsRunning; + lResult = (LRESULT)pSysTray->IsServiceEnabled(POWER_SERVICE_FLAG); return S_OK; } return S_FALSE; diff --git a/dll/shellext/stobject/precomp.h b/dll/shellext/stobject/precomp.h index 674a32ebf0..87747a90b4 100644 --- a/dll/shellext/stobject/precomp.h +++ b/dll/shellext/stobject/precomp.h @@ -34,6 +34,10 @@ extern HINSTANCE g_hInstance; #define ID_ICON_HOTPLUG (WM_APP + 0x4CC) #define ID_ICON_POWER (WM_APP + 0x4CD) +#define POWER_SERVICE_FLAG 0x00000001 +#define HOTPLUG_SERVICE_FLAG 0x00000002 +#define VOLUME_SERVICE_FLAG 0x00000004 + #include "csystray.h" typedef HRESULT(STDMETHODCALLTYPE * PFNSTINIT) (_In_ CSysTray * pSysTray); @@ -43,6 +47,7 @@ typedef HRESULT(STDMETHODCALLTYPE * PFNSTMESSAGE) (_In_ CSysTray * pSysTray, UI struct SysTrayIconHandlers_t { + DWORD dwServiceFlag; PFNSTINIT pfnInit; PFNSTSHUTDOWN pfnShutdown; PFNSTUPDATE pfnUpdate; diff --git a/dll/shellext/stobject/volume.cpp b/dll/shellext/stobject/volume.cpp index dbc92ad5ce..04723a7be2 100644 --- a/dll/shellext/stobject/volume.cpp +++ b/dll/shellext/stobject/volume.cpp @@ -21,7 +21,6 @@ DWORD g_muteControlID; UINT g_mmDeviceChange; static BOOL g_IsMute = FALSE; -static BOOL g_IsRunning = FALSE; static HRESULT __stdcall Volume_FindMixerControl(CSysTray * pSysTray) { @@ -156,8 +155,6 @@ HRESULT STDMETHODCALLTYPE Volume_Init(_In_ CSysTray * pSysTray) Volume_IsMute(); - g_IsRunning = TRUE; - HICON icon; if (g_IsMute) icon = g_hIconMute; @@ -204,8 +201,6 @@ HRESULT STDMETHODCALLTYPE Volume_Shutdown(_In_ CSysTray * pSysTray) { TRACE("Volume_Shutdown\n"); - g_IsRunning = FALSE; - return pSysTray->NotifyIcon(NIM_DELETE, ID_ICON_VOLUME, NULL, NULL); } @@ -267,20 +262,26 @@ HRESULT STDMETHODCALLTYPE Volume_Message(_In_ CSysTray * pSysTray, UINT uMsg, WP { case WM_USER + 220: TRACE("Volume_Message: WM_USER+220\n"); - if (wParam == 4) + if (wParam == VOLUME_SERVICE_FLAG) { - if (lParam == FALSE) + if (lParam) + { + pSysTray->EnableService(VOLUME_SERVICE_FLAG, TRUE); return Volume_Init(pSysTray); + } else + { + pSysTray->EnableService(VOLUME_SERVICE_FLAG, FALSE); return Volume_Shutdown(pSysTray); + } } return S_FALSE; case WM_USER + 221: TRACE("Volume_Message: WM_USER+221\n"); - if (wParam == 4) + if (wParam == VOLUME_SERVICE_FLAG) { - lResult = (LRESULT)g_IsRunning; + lResult = (LRESULT)pSysTray->IsServiceEnabled(VOLUME_SERVICE_FLAG); return S_OK; } return S_FALSE;
5 years, 8 months
1
0
0
0
[reactos] 01/02: [POWERCFG] Fix indentation and coding style. No code changes!
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=22411ef22366a6d6a8341…
commit 22411ef22366a6d6a8341767f9dd7f7d6b784dae Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Tue Apr 23 00:09:10 2019 +0200 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Tue Apr 23 00:09:10 2019 +0200 [POWERCFG] Fix indentation and coding style. No code changes! --- dll/cpl/powercfg/advanced.c | 137 +++++++++++++++++++++++-------------------- dll/cpl/powercfg/hibernate.c | 38 ++++++------ 2 files changed, 94 insertions(+), 81 deletions(-) diff --git a/dll/cpl/powercfg/advanced.c b/dll/cpl/powercfg/advanced.c index 6ca281abe6..da43d67f82 100644 --- a/dll/cpl/powercfg/advanced.c +++ b/dll/cpl/powercfg/advanced.c @@ -47,31 +47,32 @@ GetSystrayPowerIconState(VOID) static VOID AddItem(HWND hDlgCtrl, INT ResourceId, LPARAM lParam, POWER_ACTION * lpAction) { - TCHAR szBuffer[MAX_PATH]; - LRESULT Index; - if (LoadString(hApplet, ResourceId, szBuffer, MAX_PATH) < MAX_PATH) - { - Index = SendMessage(hDlgCtrl, CB_ADDSTRING, 0, (LPARAM)szBuffer); - if (Index != CB_ERR) + TCHAR szBuffer[MAX_PATH]; + LRESULT Index; + + if (LoadString(hApplet, ResourceId, szBuffer, MAX_PATH) < MAX_PATH) { - SendMessage(hDlgCtrl, CB_SETITEMDATA, (WPARAM)Index, lParam); - lpAction[Index] = (POWER_ACTION)lParam; + Index = SendMessage(hDlgCtrl, CB_ADDSTRING, 0, (LPARAM)szBuffer); + if (Index != CB_ERR) + { + SendMessage(hDlgCtrl, CB_SETITEMDATA, (WPARAM)Index, lParam); + lpAction[Index] = (POWER_ACTION)lParam; + } } - } } static INT FindActionIndex(POWER_ACTION * lpAction, DWORD dwActionSize, POWER_ACTION poAction) { - INT Index; + INT Index; - for (Index = 0; Index < (INT)dwActionSize; Index++) - { - if (lpAction[Index] == poAction) - return Index; - } + for (Index = 0; Index < (INT)dwActionSize; Index++) + { + if (lpAction[Index] == poAction) + return Index; + } - return -1; + return -1; } static BOOLEAN @@ -175,26 +176,31 @@ SaveCurrentPowerActionPolicy(IN HWND hDlgCtrl, switch(ItemData) { - case PowerActionNone: - Policy->Action = PowerActionNone; - Policy->EventCode = POWER_FORCE_TRIGGER_RESET; - break; - case PowerActionWarmEject: - Policy->Action = PowerActionNone; - Policy->EventCode = POWER_USER_NOTIFY_BUTTON; - break; - case PowerActionShutdown: - Policy->Action = PowerActionNone; - Policy->EventCode = POWER_USER_NOTIFY_SHUTDOWN; - break; - case PowerActionSleep: - case PowerActionHibernate: - Policy->Action = (POWER_ACTION)ItemData; - Policy->EventCode = 0; - break; - default: - return FALSE; + case PowerActionNone: + Policy->Action = PowerActionNone; + Policy->EventCode = POWER_FORCE_TRIGGER_RESET; + break; + + case PowerActionWarmEject: + Policy->Action = PowerActionNone; + Policy->EventCode = POWER_USER_NOTIFY_BUTTON; + break; + + case PowerActionShutdown: + Policy->Action = PowerActionNone; + Policy->EventCode = POWER_USER_NOTIFY_SHUTDOWN; + break; + + case PowerActionSleep: + case PowerActionHibernate: + Policy->Action = (POWER_ACTION)ItemData; + Policy->EventCode = 0; + break; + + default: + return FALSE; } + Policy->Flags = (POWER_ACTION_UI_ALLOWED | POWER_ACTION_QUERY_ALLOWED); return TRUE; @@ -372,8 +378,8 @@ Adv_InitDialog(VOID) if (bHibernate) { AddItem(hList2, IDS_PowerActionHibernate, (LPARAM)PowerActionHibernate, g_PowerButton); - } + if (bShutdown) { AddItem(hList2, IDS_PowerActionShutdown, (LPARAM)PowerActionShutdown, g_PowerButton); @@ -516,35 +522,37 @@ AdvancedDlgProc(HWND hwndDlg, WPARAM wParam, LPARAM lParam) { - switch(uMsg) - { - case WM_INITDIALOG: - hAdv = hwndDlg; - Adv_InitDialog(); - return TRUE; - break; - case WM_COMMAND: - switch(LOWORD(wParam)) - { - case IDC_SYSTRAYBATTERYMETER: - case IDC_PASSWORDLOGON: - case IDC_VIDEODIMDISPLAY: - if (HIWORD(wParam) == BN_CLICKED) - { - PropSheet_Changed(GetParent(hwndDlg), hwndDlg); - } - break; - case IDC_LIDCLOSE: - case IDC_POWERBUTTON: - case IDC_SLEEPBUTTON: - if (HIWORD(wParam) == CBN_SELCHANGE) + switch (uMsg) + { + case WM_INITDIALOG: + hAdv = hwndDlg; + Adv_InitDialog(); + return TRUE; + + case WM_COMMAND: + switch (LOWORD(wParam)) { - PropSheet_Changed(GetParent(hwndDlg), hwndDlg); + case IDC_SYSTRAYBATTERYMETER: + case IDC_PASSWORDLOGON: + case IDC_VIDEODIMDISPLAY: + if (HIWORD(wParam) == BN_CLICKED) + { + PropSheet_Changed(GetParent(hwndDlg), hwndDlg); + } + break; + + case IDC_LIDCLOSE: + case IDC_POWERBUTTON: + case IDC_SLEEPBUTTON: + if (HIWORD(wParam) == CBN_SELCHANGE) + { + PropSheet_Changed(GetParent(hwndDlg), hwndDlg); + } + break; } break; - } - break; - case WM_NOTIFY: + + case WM_NOTIFY: { LPNMHDR lpnm = (LPNMHDR)lParam; if (lpnm->code == (UINT)PSN_APPLY) @@ -553,6 +561,7 @@ AdvancedDlgProc(HWND hwndDlg, } return TRUE; } - } - return FALSE; + } + + return FALSE; } diff --git a/dll/cpl/powercfg/hibernate.c b/dll/cpl/powercfg/hibernate.c index 1310cc8f30..38ac05bc4b 100644 --- a/dll/cpl/powercfg/hibernate.c +++ b/dll/cpl/powercfg/hibernate.c @@ -73,7 +73,7 @@ Hib_SaveData(HWND hwndDlg) bHibernate = (BOOLEAN)(IsDlgButtonChecked(hwndDlg, IDC_HIBERNATEFILE) == BST_CHECKED); - if (CallNtPowerInformation(SystemReserveHiberFile,&bHibernate, sizeof(bHibernate), NULL, 0) == STATUS_SUCCESS) + if (CallNtPowerInformation(SystemReserveHiberFile, &bHibernate, sizeof(bHibernate), NULL, 0) == STATUS_SUCCESS) { Pos_InitData(); Adv_InitDialog(); @@ -91,22 +91,25 @@ HibernateDlgProc(HWND hwndDlg, WPARAM wParam, LPARAM lParam) { - switch(uMsg) - { - case WM_INITDIALOG: - Hib_InitDialog(hwndDlg); - return TRUE; - case WM_COMMAND: - switch(LOWORD(wParam)) - { - case IDC_HIBERNATEFILE: - if (HIWORD(wParam) == BN_CLICKED) + switch (uMsg) + { + case WM_INITDIALOG: + Hib_InitDialog(hwndDlg); + return TRUE; + + case WM_COMMAND: + switch (LOWORD(wParam)) { - PropSheet_Changed(GetParent(hwndDlg), hwndDlg); + case IDC_HIBERNATEFILE: + if (HIWORD(wParam) == BN_CLICKED) + { + PropSheet_Changed(GetParent(hwndDlg), hwndDlg); + } + break; } - } - break; - case WM_NOTIFY: + break; + + case WM_NOTIFY: { LPNMHDR lpnm = (LPNMHDR)lParam; if (lpnm->code == (UINT)PSN_APPLY) @@ -114,6 +117,7 @@ HibernateDlgProc(HWND hwndDlg, return Hib_SaveData(hwndDlg); } } - } - return FALSE; + } + + return FALSE; }
5 years, 8 months
1
0
0
0
[reactos] 01/01: [STOBJECT][MMSYS][POWERCFG] Store the "Show x icon in the taskbar" setting for the hotplug, power and volume icons.
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8fb2a2dd12ed238b52d82…
commit 8fb2a2dd12ed238b52d82e658c8726e787fe2070 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Tue Apr 23 00:04:01 2019 +0200 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Tue Apr 23 00:04:01 2019 +0200 [STOBJECT][MMSYS][POWERCFG] Store the "Show x icon in the taskbar" setting for the hotplug, power and volume icons. CORE-12365 CORE-12972 CORE-15234 --- dll/cpl/mmsys/volume.c | 2 +- dll/cpl/powercfg/advanced.c | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dll/cpl/mmsys/volume.c b/dll/cpl/mmsys/volume.c index 4c3189bbbe..b8e546e276 100644 --- a/dll/cpl/mmsys/volume.c +++ b/dll/cpl/mmsys/volume.c @@ -365,7 +365,7 @@ SaveData(HWND hwndDlg) bShowIcon = (IsDlgButtonChecked(hwndDlg, IDC_ICON_IN_TASKBAR) == BST_CHECKED); - SetSystrayVolumeIconState(!bShowIcon); + SetSystrayVolumeIconState(bShowIcon); } VOID diff --git a/dll/cpl/powercfg/advanced.c b/dll/cpl/powercfg/advanced.c index 6f28272868..6ca281abe6 100644 --- a/dll/cpl/powercfg/advanced.c +++ b/dll/cpl/powercfg/advanced.c @@ -301,17 +301,20 @@ Adv_InitDialog(VOID) BOOLEAN bSuspend = FALSE; BOOLEAN bHibernate; BOOLEAN bShutdown; + BOOL bEnabled; SYSTEM_POWER_CAPABILITIES spc; - if (GetSystrayPowerIconState()) + bEnabled = GetSystrayPowerIconState(); + + if (bEnabled) gGPP.user.GlobalFlags |= EnableSysTrayBatteryMeter; else gGPP.user.GlobalFlags &= ~EnableSysTrayBatteryMeter; CheckDlgButton(hAdv, IDC_SYSTRAYBATTERYMETER, - gGPP.user.GlobalFlags & EnableSysTrayBatteryMeter ? BST_CHECKED : BST_UNCHECKED); + bEnabled ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hAdv, IDC_PASSWORDLOGON, gGPP.user.GlobalFlags & EnablePasswordLogon ? BST_CHECKED : BST_UNCHECKED); @@ -501,7 +504,7 @@ Adv_SaveData(HWND hwndDlg) MessageBox(hwndDlg, L"WriteGlobalPwrPolicy failed", NULL, MB_OK); } - SetSystrayPowerIconState(!bSystrayBatteryMeter); + SetSystrayPowerIconState(bSystrayBatteryMeter); Adv_InitDialog(); }
5 years, 8 months
1
0
0
0
[reactos] 03/03: [EXPLORER] Minor cleanup/comment fixes.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a7ddabcc128c882df214d…
commit a7ddabcc128c882df214de984e941e32e25b53a4 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Mon Apr 22 21:25:41 2019 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Mon Apr 22 21:25:41 2019 +0200 [EXPLORER] Minor cleanup/comment fixes. --- base/shell/explorer/syspager.cpp | 12 ++++++++---- base/shell/explorer/trayclock.cpp | 4 +--- base/shell/explorer/trayntfy.cpp | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/base/shell/explorer/syspager.cpp b/base/shell/explorer/syspager.cpp index 1755ebedde..44ccff9b90 100644 --- a/base/shell/explorer/syspager.cpp +++ b/base/shell/explorer/syspager.cpp @@ -180,7 +180,8 @@ public: void Initialize(HWND hWndParent, CBalloonQueue * queue); }; -extern const WCHAR szSysPagerWndClass[]; + +static const WCHAR szSysPagerWndClass[] = L"SysPager"; class CSysPagerWnd : public CComCoClass<CSysPagerWnd>, @@ -258,6 +259,10 @@ public: HRESULT Initialize(IN HWND hWndParent); }; +/* + * IconWatcher + */ + CIconWatcher::CIconWatcher() : m_hWatcherThread(NULL), m_WakeUpEvent(NULL), @@ -489,8 +494,8 @@ UINT WINAPI CIconWatcher::WatcherThread(_In_opt_ LPVOID lpParam) } /* -* NotifyToolbar -*/ + * BalloonQueue + */ CBalloonQueue::CBalloonQueue() : m_hwndParent(NULL), @@ -1255,7 +1260,6 @@ void CNotifyToolbar::Initialize(HWND hWndParent, CBalloonQueue * queue) /* * SysPagerWnd */ -const WCHAR szSysPagerWndClass[] = L"SysPager"; CSysPagerWnd::CSysPagerWnd() {} diff --git a/base/shell/explorer/trayclock.cpp b/base/shell/explorer/trayclock.cpp index 8c217c8c4c..f21ba2c110 100644 --- a/base/shell/explorer/trayclock.cpp +++ b/base/shell/explorer/trayclock.cpp @@ -39,7 +39,7 @@ const UINT ClockWndFormatsCount = _ARRAYSIZE(ClockWndFormats); #define CLOCKWND_FORMAT_COUNT ClockWndFormatsCount -extern const WCHAR szTrayClockWndClass[]; +static const WCHAR szTrayClockWndClass[] = L"TrayClockWClass"; class CTrayClockWnd : public CComCoClass<CTrayClockWnd>, @@ -142,8 +142,6 @@ public: HRESULT Initialize(IN HWND hWndParent); }; -const WCHAR szTrayClockWndClass[] = L"TrayClockWClass"; - #define ID_TRAYCLOCK_TIMER 0 #define ID_TRAYCLOCK_TIMER_INIT 1 diff --git a/base/shell/explorer/trayntfy.cpp b/base/shell/explorer/trayntfy.cpp index 4326ca727e..63dc236263 100644 --- a/base/shell/explorer/trayntfy.cpp +++ b/base/shell/explorer/trayntfy.cpp @@ -25,7 +25,7 @@ * TrayNotifyWnd */ -static const WCHAR szTrayNotifyWndClass [] = TEXT("TrayNotifyWnd"); +static const WCHAR szTrayNotifyWndClass[] = L"TrayNotifyWnd"; #define TRAY_NOTIFY_WND_SPACING_X 1 #define TRAY_NOTIFY_WND_SPACING_Y 1
5 years, 8 months
1
0
0
0
[reactos] 02/03: [NTOS:CM] In CmpParseKey(), do not assert but instead correctly return failure if CmpHandleExitNode() doesn't return a valid node, or CmpCreateKeyControlBlock() fails.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=884db2ea06f1c961d2efc…
commit 884db2ea06f1c961d2efcc13d477bc76ea0f7f50 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Mon Apr 22 21:09:10 2019 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Mon Apr 22 21:09:10 2019 +0200 [NTOS:CM] In CmpParseKey(), do not assert but instead correctly return failure if CmpHandleExitNode() doesn't return a valid node, or CmpCreateKeyControlBlock() fails. --- ntoskrnl/config/cmparse.c | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/ntoskrnl/config/cmparse.c b/ntoskrnl/config/cmparse.c index fe25e252bd..872a79619a 100644 --- a/ntoskrnl/config/cmparse.c +++ b/ntoskrnl/config/cmparse.c @@ -960,7 +960,7 @@ CmpHandleExitNode(IN OUT PHHIVE *Hive, { /* Release it */ ASSERT(*ReleaseHive != NULL); - HvReleaseCell((*ReleaseHive), *ReleaseCell); + HvReleaseCell(*ReleaseHive, *ReleaseCell); } /* Get the link references */ @@ -968,7 +968,7 @@ CmpHandleExitNode(IN OUT PHHIVE *Hive, *Cell = (*KeyNode)->ChildHiveReference.KeyCell; /* Get the new node */ - *KeyNode = (PCM_KEY_NODE)HvGetCell((*Hive), *Cell); + *KeyNode = (PCM_KEY_NODE)HvGetCell(*Hive, *Cell); if (*KeyNode) { /* Set the new release values */ @@ -1191,7 +1191,12 @@ CmpParseKey(IN PVOID ParseObject, &Node, &HiveToRelease, &CellToRelease); - if (!Node) ASSERT(FALSE); + if (!Node) + { + /* Fail */ + Status = STATUS_INSUFFICIENT_RESOURCES; + break; + } } /* Do the open */ @@ -1232,7 +1237,12 @@ CmpParseKey(IN PVOID ParseObject, &Node, &HiveToRelease, &CellToRelease); - if (!Node) ASSERT(FALSE); + if (!Node) + { + /* Fail */ + Status = STATUS_INSUFFICIENT_RESOURCES; + break; + } } /* Create a KCB for this key */ @@ -1242,7 +1252,12 @@ CmpParseKey(IN PVOID ParseObject, ParentKcb, 0, &NextName); - if (!Kcb) ASSERT(FALSE); + if (!Kcb) + { + /* Fail */ + Status = STATUS_INSUFFICIENT_RESOURCES; + break; + } /* Dereference the parent and set the new one */ CmpDereferenceKeyControlBlock(ParentKcb); @@ -1353,7 +1368,12 @@ CmpParseKey(IN PVOID ParseObject, &Node, &HiveToRelease, &CellToRelease); - if (!Node) ASSERT(FALSE); + if (!Node) + { + /* Fail */ + Status = STATUS_INSUFFICIENT_RESOURCES; + break; + } } /* Do the open */ @@ -1386,7 +1406,8 @@ CmpParseKey(IN PVOID ParseObject, /* Dereference the parent if it exists */ Quickie: - if (ParentKcb) CmpDereferenceKeyControlBlock(ParentKcb); + if (ParentKcb) + CmpDereferenceKeyControlBlock(ParentKcb); /* Unlock the registry */ CmpUnlockRegistry();
5 years, 8 months
1
0
0
0
[reactos] 01/03: [NTOS] Fix typos.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=627b1df579f2fbdc17add…
commit 627b1df579f2fbdc17addac253416ec8607aa99a Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Mon Apr 22 19:41:19 2019 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Mon Apr 22 19:41:19 2019 +0200 [NTOS] Fix typos. --- ntoskrnl/ex/uuid.c | 4 ++-- ntoskrnl/se/audit.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ntoskrnl/ex/uuid.c b/ntoskrnl/ex/uuid.c index fdda755214..4d3c2932bc 100644 --- a/ntoskrnl/ex/uuid.c +++ b/ntoskrnl/ex/uuid.c @@ -26,7 +26,7 @@ #define SECS_15_OCT_1582_TO_1601 ((17 + 30 + 31 + 365 * 18 + 5) * SECSPERDAY) #define TICKS_15_OCT_1582_TO_1601 ((ULONGLONG)SECS_15_OCT_1582_TO_1601 * TICKSPERSEC) -/* 10000 in 100-ns model = 0,1 microsecond */ +/* 10000 in 100-ns model = 0.1 microsecond */ #define TIME_FRAME 10000 #if defined (ALLOC_PRAGMA) @@ -247,7 +247,7 @@ ExpAllocateUuids(PULARGE_INTEGER Time, return STATUS_RETRY; } - /* If time diff > 0,1ms, squash it to reduce it to keep our clock resolution */ + /* If time diff > 0.1ms, squash it to reduce it to keep our clock resolution */ if (TimeDiff.HighPart > 0 || TimeDiff.QuadPart > TICKS_PER_CLOCK_TICK * TIME_FRAME) { TimeDiff.QuadPart = TICKS_PER_CLOCK_TICK * TIME_FRAME; diff --git a/ntoskrnl/se/audit.c b/ntoskrnl/se/audit.c index c10e3bf3ad..e4722f3da9 100644 --- a/ntoskrnl/se/audit.c +++ b/ntoskrnl/se/audit.c @@ -457,7 +457,7 @@ SepAccessCheckAndAuditAlarm( if ((ResultListLength == 0) || (ResultListLength > 0x1000)) { Status = STATUS_INVALID_PARAMETER; - DPRINT1("Invalud ResultListLength: 0x%lx\n", ResultListLength); + DPRINT1("Invalid ResultListLength: 0x%lx\n", ResultListLength); goto Cleanup; }
5 years, 8 months
1
0
0
0
[reactos] 01/01: [FREELDR] Add some missing UiDrawBackdrop() calls.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2e1f594d5e3f25b3aaf2b…
commit 2e1f594d5e3f25b3aaf2bd6a9ee76a03f5279f0b Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Mon Apr 22 19:33:20 2019 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Mon Apr 22 19:33:20 2019 +0200 [FREELDR] Add some missing UiDrawBackdrop() calls. --- boot/freeldr/freeldr/disk/ramdisk.c | 1 + boot/freeldr/freeldr/linuxboot.c | 3 +-- boot/freeldr/freeldr/ntldr/winldr.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/boot/freeldr/freeldr/disk/ramdisk.c b/boot/freeldr/freeldr/disk/ramdisk.c index f922452d1b..4b2677a795 100644 --- a/boot/freeldr/freeldr/disk/ramdisk.c +++ b/boot/freeldr/freeldr/disk/ramdisk.c @@ -131,6 +131,7 @@ RamDiskLoadVirtualFile(IN PCHAR FileName) // // Display progress // + UiDrawBackdrop(); UiDrawProgressBarCenter(1, 100, MsgBuffer); // diff --git a/boot/freeldr/freeldr/linuxboot.c b/boot/freeldr/freeldr/linuxboot.c index c2c8f97e82..54b16a6282 100644 --- a/boot/freeldr/freeldr/linuxboot.c +++ b/boot/freeldr/freeldr/linuxboot.c @@ -83,13 +83,12 @@ LoadAndBootLinux(IN OperatingSystemItem* OperatingSystem, PFILE LinuxKernel = 0; PFILE LinuxInitrdFile = 0; - UiDrawBackdrop(); - if (Description) sprintf(LinuxBootDescription, "Loading %s...", Description); else strcpy(LinuxBootDescription, "Loading Linux..."); + UiDrawBackdrop(); UiDrawStatusText(LinuxBootDescription); UiDrawProgressBarCenter(0, 100, LinuxBootDescription); diff --git a/boot/freeldr/freeldr/ntldr/winldr.c b/boot/freeldr/freeldr/ntldr/winldr.c index e01c5174ca..e563188bc3 100644 --- a/boot/freeldr/freeldr/ntldr/winldr.c +++ b/boot/freeldr/freeldr/ntldr/winldr.c @@ -358,6 +358,7 @@ WinLdrLoadModule(PCSTR ModuleName, //CHAR ProgressString[256]; /* Inform user we are loading files */ + //UiDrawBackdrop(); //sprintf(ProgressString, "Loading %s...", FileName); //UiDrawProgressBarCenter(1, 100, ProgressString);
5 years, 8 months
1
0
0
0
[reactos] 03/03: [OPENGL32] Fix the order of the specified callbacks for the DrvSetCallbackProcs() call.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=05b052fee2fb6d6a6db83…
commit 05b052fee2fb6d6a6db83ec5855ad8971e100051 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Mon Apr 22 18:29:43 2019 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Mon Apr 22 18:29:43 2019 +0200 [OPENGL32] Fix the order of the specified callbacks for the DrvSetCallbackProcs() call. References: -
https://github.com/OpenSWR/openswr/blob/master/ogldriver/wgl.cpp
-
https://github.com/Igalia/mesa/blob/master/src/gallium/state_trackers/wgl/s…
- "OpenGL Installable Client Driver, Version 1.101 -- Reference Guide" by Microsoft Corporation. --- dll/opengl/opengl32/icdload.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dll/opengl/opengl32/icdload.c b/dll/opengl/opengl32/icdload.c index 0f4c65a782..fc86d86363 100644 --- a/dll/opengl/opengl32/icdload.c +++ b/dll/opengl/opengl32/icdload.c @@ -287,10 +287,11 @@ custom_end: DrvSetCallbackProcs = (void*)GetProcAddress(data->hModule, "DrvSetCallbackProcs"); if(DrvSetCallbackProcs) { - PROC callbacks[] = {(PROC)wglGetCurrentValue, + PROC callbacks[] = { (PROC)wglSetCurrentValue, + (PROC)wglGetCurrentValue, (PROC)wglGetDHGLRC}; - DrvSetCallbackProcs(3, callbacks); + DrvSetCallbackProcs(ARRAYSIZE(callbacks), callbacks); } /* Get the DLL exports */
5 years, 8 months
1
0
0
0
[reactos] 02/03: [OPENGL32] Fix usage of TEB members.
by Bernhard Feichtinger
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a8fa5394ef802757023a7…
commit a8fa5394ef802757023a70870fafce7421a02204 Author: Bernhard Feichtinger <43303168+BieHDC(a)users.noreply.github.com> AuthorDate: Sat Apr 13 23:24:21 2019 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Mon Apr 22 17:42:13 2019 +0200 [OPENGL32] Fix usage of TEB members. --- dll/opengl/opengl32/opengl32.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dll/opengl/opengl32/opengl32.h b/dll/opengl/opengl32/opengl32.h index 8808ca55ff..32b4f35b32 100644 --- a/dll/opengl/opengl32/opengl32.h +++ b/dll/opengl/opengl32/opengl32.h @@ -134,7 +134,7 @@ IntMakeCurrent(HGLRC hglrc, HDC hdc, struct wgl_dc_data* dc_data) CurrentTeb->glCurrentRC = hglrc; CurrentTeb->glReserved2 = hdc; - CurrentTeb->glContext = dc_data; + CurrentTeb->glSectionInfo = dc_data; } FORCEINLINE @@ -155,21 +155,21 @@ static inline struct wgl_dc_data* IntGetCurrentDcData(void) { - return NtCurrentTeb()->glContext; + return NtCurrentTeb()->glSectionInfo; } FORCEINLINE void IntSetCurrentICDPrivate(void* value) { - NtCurrentTeb()->glReserved1[0] = (ULONG_PTR)value; + NtCurrentTeb()->glContext = value; } FORCEINLINE void* IntGetCurrentICDPrivate(void) { - return (void*)NtCurrentTeb()->glReserved1[0]; + return (void*)NtCurrentTeb()->glContext; } FORCEINLINE
5 years, 8 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
...
24
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
Results per page:
10
25
50
100
200