Skip to content

Commit

Permalink
BR_Win32_SendMessage: swap the documented order of w/l parameters [ci…
Browse files Browse the repository at this point in the history
… skip]

Fixes #1900
  • Loading branch information
cfillion committed Sep 19, 2024
1 parent f9ab612 commit 539b524
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Breeder/BR_ReaScript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1204,9 +1204,9 @@ void BR_Win32_ScreenToClient(void* hwnd, int xIn, int yIn, int* xOut, int* yOut)
WritePtr(yOut, (int)p.y);
}

int BR_Win32_SendMessage(void* hwnd, int msg, int lParam, int wParam)
int BR_Win32_SendMessage(void* hwnd, int msg, int wParam, int lParam)
{
return (int)SendMessage((HWND)hwnd, msg, lParam, wParam);
return (int)SendMessage((HWND)hwnd, msg, wParam, lParam);
}

void* BR_Win32_SetFocus(void* hwnd)
Expand Down
2 changes: 1 addition & 1 deletion Breeder/BR_ReaScript.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ int BR_Win32_MAKEWORD (int low, int high);
int BR_Win32_MAKEWPARAM (int low, int high);
void* BR_Win32_MIDIEditor_GetActive ();
void BR_Win32_ScreenToClient (void* hwnd, int xIn, int yIn, int* xOut, int* yOut);
int BR_Win32_SendMessage (void* hwnd, int msg, int lParam, int wParam);
int BR_Win32_SendMessage (void* hwnd, int msg, int wParam, int lParam);
void* BR_Win32_SetFocus (void* hwnd);
int BR_Win32_SetForegroundWindow (void* hwnd);
int BR_Win32_SetWindowLong (void* hwnd, int index, int newLong);
Expand Down
2 changes: 1 addition & 1 deletion ReaScript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ APIdef g_apidefs[] =
{ APIFUNC(BR_Win32_MAKEWPARAM), "int", "int,int", "low,high", "[BR] Equivalent to win32 API MAKEWPARAM().", },
{ APIFUNC(BR_Win32_MIDIEditor_GetActive), "void*", "", "", "[BR] Alternative to <a href=\"#MIDIEditor_GetActive\">MIDIEditor_GetActive</a>. REAPER seems to have problems with extensions using HWND type for exported functions so all BR_Win32 functions use void* instead of HWND type.", },
{ APIFUNC(BR_Win32_ScreenToClient), "void", "void*,int,int,int*,int*", "hwnd,xIn,yIn,xOut,yOut", "[BR] Equivalent to win32 API ClientToScreen().", },
{ APIFUNC(BR_Win32_SendMessage), "int", "void*,int,int,int", "hwnd,msg,lParam,wParam", "[BR] Equivalent to win32 API SendMessage().", },
{ APIFUNC(BR_Win32_SendMessage), "int", "void*,int,int,int", "hwnd,msg,wParam,lParam", "[BR] Equivalent to win32 API SendMessage().", },
{ APIFUNC(BR_Win32_SetFocus), "void*", "void*", "hwnd", "[BR] Equivalent to win32 API SetFocus().", },
{ APIFUNC(BR_Win32_SetForegroundWindow), "int", "void*", "hwnd", "[BR] Equivalent to win32 API SetForegroundWindow().", },
{ APIFUNC(BR_Win32_SetWindowLong), "int", "void*,int,int", "hwnd,index,newLong", "[BR] Equivalent to win32 API SetWindowLong().", },
Expand Down

0 comments on commit 539b524

Please sign in to comment.