hw/xwin: Fix uses of CreateDialogParam() for 64-bit builds
Fix uses of CreateDialogParam() to be more strictly correct, for 64-bit builds dwInitParam parameter is LPARAM, not int Return type of DLGPROC is INT_PTR, not WINBOOL Also: Reporting the value of g_hDlgDepthChange is completely uninteresting, we are just interested in GetLastError() if it is NULL Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
This commit is contained in:
		
							parent
							
								
									b542976846
								
							
						
					
					
						commit
						fc40f9a92c
					
				| 
						 | 
					@ -47,13 +47,13 @@ extern Bool g_fClipboardStarted;
 | 
				
			||||||
 * Local function prototypes
 | 
					 * Local function prototypes
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static wBOOL CALLBACK
 | 
					static INT_PTR CALLBACK
 | 
				
			||||||
winExitDlgProc(HWND hDialog, UINT message, WPARAM wParam, LPARAM lParam);
 | 
					winExitDlgProc(HWND hDialog, UINT message, WPARAM wParam, LPARAM lParam);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static wBOOL CALLBACK
 | 
					static INT_PTR CALLBACK
 | 
				
			||||||
winChangeDepthDlgProc(HWND hDialog, UINT message, WPARAM wParam, LPARAM lParam);
 | 
					winChangeDepthDlgProc(HWND hDialog, UINT message, WPARAM wParam, LPARAM lParam);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static wBOOL CALLBACK
 | 
					static INT_PTR CALLBACK
 | 
				
			||||||
winAboutDlgProc(HWND hDialog, UINT message, WPARAM wParam, LPARAM lParam);
 | 
					winAboutDlgProc(HWND hDialog, UINT message, WPARAM wParam, LPARAM lParam);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
| 
						 | 
					@ -285,7 +285,7 @@ winDisplayExitDialog(winPrivScreenPtr pScreenPriv)
 | 
				
			||||||
    g_hDlgExit = CreateDialogParam(g_hInstance,
 | 
					    g_hDlgExit = CreateDialogParam(g_hInstance,
 | 
				
			||||||
                                   "EXIT_DIALOG",
 | 
					                                   "EXIT_DIALOG",
 | 
				
			||||||
                                   pScreenPriv->hwndScreen,
 | 
					                                   pScreenPriv->hwndScreen,
 | 
				
			||||||
                                   winExitDlgProc, (int) pScreenPriv);
 | 
					                                   winExitDlgProc, (LPARAM) pScreenPriv);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* Show the dialog box */
 | 
					    /* Show the dialog box */
 | 
				
			||||||
    ShowWindow(g_hDlgExit, SW_SHOW);
 | 
					    ShowWindow(g_hDlgExit, SW_SHOW);
 | 
				
			||||||
| 
						 | 
					@ -304,7 +304,7 @@ winDisplayExitDialog(winPrivScreenPtr pScreenPriv)
 | 
				
			||||||
 * Exit dialog window procedure
 | 
					 * Exit dialog window procedure
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static wBOOL CALLBACK
 | 
					static INT_PTR CALLBACK
 | 
				
			||||||
winExitDlgProc(HWND hDialog, UINT message, WPARAM wParam, LPARAM lParam)
 | 
					winExitDlgProc(HWND hDialog, UINT message, WPARAM wParam, LPARAM lParam)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    static winPrivScreenPtr s_pScreenPriv = NULL;
 | 
					    static winPrivScreenPtr s_pScreenPriv = NULL;
 | 
				
			||||||
| 
						 | 
					@ -404,14 +404,13 @@ winDisplayDepthChangeDialog(winPrivScreenPtr pScreenPriv)
 | 
				
			||||||
                                          "DEPTH_CHANGE_BOX",
 | 
					                                          "DEPTH_CHANGE_BOX",
 | 
				
			||||||
                                          pScreenPriv->hwndScreen,
 | 
					                                          pScreenPriv->hwndScreen,
 | 
				
			||||||
                                          winChangeDepthDlgProc,
 | 
					                                          winChangeDepthDlgProc,
 | 
				
			||||||
                                          (int) pScreenPriv);
 | 
					                                          (LPARAM) pScreenPriv);
 | 
				
			||||||
    /* Show the dialog box */
 | 
					    /* Show the dialog box */
 | 
				
			||||||
    ShowWindow(g_hDlgDepthChange, SW_SHOW);
 | 
					    ShowWindow(g_hDlgDepthChange, SW_SHOW);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ErrorF("winDisplayDepthChangeDialog - DialogBox returned: %d\n",
 | 
					    if (!g_hDlgDepthChange)
 | 
				
			||||||
           (int) g_hDlgDepthChange);
 | 
					        ErrorF("winDisplayDepthChangeDialog - GetLastError: %d\n",
 | 
				
			||||||
    ErrorF("winDisplayDepthChangeDialog - GetLastError: %d\n",
 | 
					                (int) GetLastError());
 | 
				
			||||||
           (int) GetLastError());
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* Minimize the display window */
 | 
					    /* Minimize the display window */
 | 
				
			||||||
    ShowWindow(pScreenPriv->hwndScreen, SW_MINIMIZE);
 | 
					    ShowWindow(pScreenPriv->hwndScreen, SW_MINIMIZE);
 | 
				
			||||||
| 
						 | 
					@ -422,7 +421,7 @@ winDisplayDepthChangeDialog(winPrivScreenPtr pScreenPriv)
 | 
				
			||||||
 * disruptive screen depth changes. 
 | 
					 * disruptive screen depth changes. 
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static wBOOL CALLBACK
 | 
					static INT_PTR CALLBACK
 | 
				
			||||||
winChangeDepthDlgProc(HWND hwndDialog, UINT message,
 | 
					winChangeDepthDlgProc(HWND hwndDialog, UINT message,
 | 
				
			||||||
                      WPARAM wParam, LPARAM lParam)
 | 
					                      WPARAM wParam, LPARAM lParam)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					@ -536,7 +535,7 @@ winDisplayAboutDialog(winPrivScreenPtr pScreenPriv)
 | 
				
			||||||
    g_hDlgAbout = CreateDialogParam(g_hInstance,
 | 
					    g_hDlgAbout = CreateDialogParam(g_hInstance,
 | 
				
			||||||
                                    "ABOUT_BOX",
 | 
					                                    "ABOUT_BOX",
 | 
				
			||||||
                                    pScreenPriv->hwndScreen,
 | 
					                                    pScreenPriv->hwndScreen,
 | 
				
			||||||
                                    winAboutDlgProc, (int) pScreenPriv);
 | 
					                                    winAboutDlgProc, (LPARAM) pScreenPriv);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* Show the dialog box */
 | 
					    /* Show the dialog box */
 | 
				
			||||||
    ShowWindow(g_hDlgAbout, SW_SHOW);
 | 
					    ShowWindow(g_hDlgAbout, SW_SHOW);
 | 
				
			||||||
| 
						 | 
					@ -553,7 +552,7 @@ winDisplayAboutDialog(winPrivScreenPtr pScreenPriv)
 | 
				
			||||||
 * Process messages for the about dialog.
 | 
					 * Process messages for the about dialog.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static wBOOL CALLBACK
 | 
					static INT_PTR CALLBACK
 | 
				
			||||||
winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam)
 | 
					winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    static winPrivScreenPtr s_pScreenPriv = NULL;
 | 
					    static winPrivScreenPtr s_pScreenPriv = NULL;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue