mirror of
https://github.com/AppleWin/AppleWin.git
synced 2024-06-02 20:41:38 +00:00
Right-Click now ejects disk image
Shift-Right-Click sets write protection Ctrl-Right-Click clears write protection
This commit is contained in:
parent
15a6c00bd5
commit
eefbc4082e
|
@ -724,8 +724,36 @@ LRESULT CALLBACK FrameWndProc (HWND window,
|
||||||
|
|
||||||
case WM_RBUTTONDOWN:
|
case WM_RBUTTONDOWN:
|
||||||
case WM_RBUTTONUP:
|
case WM_RBUTTONUP:
|
||||||
|
// Right Click on Drive Icon -- eject Disk
|
||||||
|
if ((buttonover == -1) && (message == WM_RBUTTONUP)) // HACK: BUTTON_NONE
|
||||||
|
{
|
||||||
|
int x = LOWORD(lparam);
|
||||||
|
int y = HIWORD(lparam);
|
||||||
|
|
||||||
|
if ((x >= buttonx) &&
|
||||||
|
(y >= buttony) &&
|
||||||
|
(y <= buttony+BUTTONS*BUTTONCY))
|
||||||
|
{
|
||||||
|
int iButton = (y-buttony-1)/BUTTONCY;
|
||||||
|
int iDrive = iButton - BTN_DRIVE1;
|
||||||
|
if ((iButton == BTN_DRIVE1) || (iButton == BTN_DRIVE2))
|
||||||
|
{
|
||||||
|
if (KeybGetShiftStatus())
|
||||||
|
DiskProtect( iDrive, true );
|
||||||
|
else
|
||||||
|
if (KeybGetCtrlStatus())
|
||||||
|
DiskProtect( iDrive, false );
|
||||||
|
else
|
||||||
|
DiskEject( iDrive );
|
||||||
|
FrameRefreshStatus(DRAW_LEDS | DRAW_BUTTON_DRIVES);
|
||||||
|
DrawButton((HDC)0,iButton);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (usingcursor)
|
if (usingcursor)
|
||||||
|
{
|
||||||
JoySetButton(1,(message == WM_RBUTTONDOWN));
|
JoySetButton(1,(message == WM_RBUTTONDOWN));
|
||||||
|
}
|
||||||
RelayEvent(message,wparam,lparam);
|
RelayEvent(message,wparam,lparam);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user