Improved USB debugger toolbar handling.
- Added XPM bitmap for the "trigger" state. - Init toolbar with USB debugger disabled state and switch to enabled when setting up the USB debug type. - USB debugger is now available with plugins enabled.
This commit is contained in:
parent
c0706da40c
commit
dc05bec7e3
@ -18,6 +18,7 @@ Detailed change log :
|
|||||||
- GUI and display libraries
|
- GUI and display libraries
|
||||||
- Debugger gui can now use ini file from BXSHARE path when using gui option
|
- Debugger gui can now use ini file from BXSHARE path when using gui option
|
||||||
extension "gui_debug:globalini" (sdl, sdl2, win32, x11)
|
extension "gui_debug:globalini" (sdl, sdl2, win32, x11)
|
||||||
|
- added bitmap change support for the wxWidgets toolbar
|
||||||
|
|
||||||
- I/O Devices
|
- I/O Devices
|
||||||
- VGA
|
- VGA
|
||||||
|
2
bochs/configure
vendored
2
bochs/configure
vendored
@ -24747,7 +24747,7 @@ printf "%s\n" "no" >&6; }
|
|||||||
fi
|
fi
|
||||||
else $as_nop
|
else $as_nop
|
||||||
|
|
||||||
if test "$bx_debugger" = 1 -a "$use_usb" = 1 -a "$bx_plugins" = 0; then
|
if test "$bx_debugger" = 1 -a "$use_usb" = 1; then
|
||||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||||
printf "%s\n" "yes" >&6; }
|
printf "%s\n" "yes" >&6; }
|
||||||
usb_debugger=1
|
usb_debugger=1
|
||||||
|
@ -1684,7 +1684,7 @@ AC_ARG_ENABLE(win32usbdbg,
|
|||||||
usb_debugger=0
|
usb_debugger=0
|
||||||
fi],
|
fi],
|
||||||
[
|
[
|
||||||
if test "$bx_debugger" = 1 -a "$use_usb" = 1 -a "$bx_plugins" = 0; then
|
if test "$bx_debugger" = 1 -a "$use_usb" = 1; then
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
usb_debugger=1
|
usb_debugger=1
|
||||||
else
|
else
|
||||||
|
40
bochs/gui/bitmaps/usbdbg_trigger.xpm
Normal file
40
bochs/gui/bitmaps/usbdbg_trigger.xpm
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/* XPM */
|
||||||
|
static char *usbdbg_trigger_xpm[] = {
|
||||||
|
/* columns rows colors chars-per-pixel */
|
||||||
|
"32 32 2 1 ",
|
||||||
|
". c None",
|
||||||
|
"# c black",
|
||||||
|
/* pixels */
|
||||||
|
"...#...........................#",
|
||||||
|
"..#...........................#.",
|
||||||
|
".#....####################...#..",
|
||||||
|
"..#..######################...#.",
|
||||||
|
"...######..............#####...#",
|
||||||
|
"..#.####................####..#.",
|
||||||
|
".#..#####..............#####.#..",
|
||||||
|
"..#.########################..#.",
|
||||||
|
"...#########################...#",
|
||||||
|
"..#.########################..#.",
|
||||||
|
".#..########################.#..",
|
||||||
|
"..#.########################..#.",
|
||||||
|
"...#########################...#",
|
||||||
|
"..#.########################..#.",
|
||||||
|
".#..########################.#..",
|
||||||
|
"..#.########################..#.",
|
||||||
|
"...#########################...#",
|
||||||
|
"..#.########################..#.",
|
||||||
|
".#..########################.#..",
|
||||||
|
"..#.########################..#.",
|
||||||
|
"...#########################...#",
|
||||||
|
"..#.########################..#.",
|
||||||
|
".#...######################..#..",
|
||||||
|
"..#...##................##....#.",
|
||||||
|
"...#..##................##.....#",
|
||||||
|
"..#...##..##........##..##....#.",
|
||||||
|
".#....##..##........##..##...#..",
|
||||||
|
"..#...##..##........##..##....#.",
|
||||||
|
"...#..##..##........##..##.....#",
|
||||||
|
"..#...##................##....#.",
|
||||||
|
".#....####################...#..",
|
||||||
|
"..#....##################.....#."
|
||||||
|
};
|
@ -1476,6 +1476,10 @@ void bx_wx_gui_c::replace_bitmap(unsigned hbar_id, unsigned bmap_id)
|
|||||||
theFrame->SetToolBarBitmap(ID_Edit_FD_1, bmap_id == floppyB_bmap_id);
|
theFrame->SetToolBarBitmap(ID_Edit_FD_1, bmap_id == floppyB_bmap_id);
|
||||||
} else if (hbar_id == cdrom1_hbar_id) {
|
} else if (hbar_id == cdrom1_hbar_id) {
|
||||||
theFrame->SetToolBarBitmap(ID_Edit_Cdrom1, bmap_id == cdrom1_bmap_id);
|
theFrame->SetToolBarBitmap(ID_Edit_Cdrom1, bmap_id == cdrom1_bmap_id);
|
||||||
|
#if BX_USE_WIN32USBDEBUG
|
||||||
|
} else if (hbar_id == usbdbg_hbar_id) {
|
||||||
|
theFrame->SetToolBarBitmap(ID_Toolbar_USB_Debug, bmap_id == usbdbg_trigger_bmap_id);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,7 +98,8 @@
|
|||||||
#include "bitmaps/userbutton.xpm"
|
#include "bitmaps/userbutton.xpm"
|
||||||
#include "bitmaps/saverestore.xpm"
|
#include "bitmaps/saverestore.xpm"
|
||||||
#if BX_USE_WIN32USBDEBUG
|
#if BX_USE_WIN32USBDEBUG
|
||||||
#include "bitmaps/usb.xpm"
|
#include "bitmaps/usbdbg.xpm"
|
||||||
|
#include "bitmaps/usbdbg_trigger.xpm"
|
||||||
#endif
|
#endif
|
||||||
#ifdef __WXGTK__
|
#ifdef __WXGTK__
|
||||||
#include "icon_bochs.xpm"
|
#include "icon_bochs.xpm"
|
||||||
@ -450,7 +451,7 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size,
|
|||||||
BX_ADD_TOOL(ID_Edit_Cdrom1, cdrom1_eject_xpm, wxT("Change first CDROM media"));
|
BX_ADD_TOOL(ID_Edit_Cdrom1, cdrom1_eject_xpm, wxT("Change first CDROM media"));
|
||||||
BX_ADD_TOOL(ID_Toolbar_Mouse_en, mouse_dis_xpm, wxT("Enable mouse capture"));
|
BX_ADD_TOOL(ID_Toolbar_Mouse_en, mouse_dis_xpm, wxT("Enable mouse capture"));
|
||||||
#if BX_USE_WIN32USBDEBUG
|
#if BX_USE_WIN32USBDEBUG
|
||||||
BX_ADD_TOOL(ID_Toolbar_USB_Debug, usbdbg_xpm, wxT("Trigger the USB Debugger"));
|
BX_ADD_TOOL(ID_Toolbar_USB_Debug, usbdbg_xpm, wxT("USB Debugger support not enabled"));
|
||||||
#endif
|
#endif
|
||||||
bxToolBar->AddSeparator();
|
bxToolBar->AddSeparator();
|
||||||
BX_ADD_TOOL(ID_Toolbar_User, userbutton_xpm, wxT("Send keyboard shortcut"));
|
BX_ADD_TOOL(ID_Toolbar_User, userbutton_xpm, wxT("Send keyboard shortcut"));
|
||||||
@ -878,7 +879,7 @@ void MyFrame::UpdateToolBar(bool simPresent)
|
|||||||
bxToolBar->SetToolShortHelp(ID_Toolbar_Power, wxT("Turn power on"));
|
bxToolBar->SetToolShortHelp(ID_Toolbar_Power, wxT("Turn power on"));
|
||||||
}
|
}
|
||||||
#if BX_USE_WIN32USBDEBUG
|
#if BX_USE_WIN32USBDEBUG
|
||||||
bxToolBar->EnableTool(ID_Toolbar_USB_Debug, simPresent);
|
bxToolBar->EnableTool(ID_Toolbar_USB_Debug, false);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1322,6 +1323,15 @@ void MyFrame::SetToolBarBitmap(int id, bool onoff)
|
|||||||
case ID_Toolbar_Mouse_en:
|
case ID_Toolbar_Mouse_en:
|
||||||
bitmap = wxBitmap(onoff ? mouse_xpm : mouse_dis_xpm);
|
bitmap = wxBitmap(onoff ? mouse_xpm : mouse_dis_xpm);
|
||||||
break;
|
break;
|
||||||
|
#if BX_USE_WIN32USBDEBUG
|
||||||
|
case ID_Toolbar_USB_Debug:
|
||||||
|
if (!bxToolBar->GetToolEnabled(ID_Toolbar_USB_Debug)) {
|
||||||
|
bxToolBar->EnableTool(ID_Toolbar_USB_Debug, true);
|
||||||
|
bxToolBar->SetToolShortHelp(ID_Toolbar_USB_Debug, wxT("Trigger the USB debugger"));
|
||||||
|
}
|
||||||
|
bitmap = wxBitmap(onoff ? usbdbg_trigger_xpm : usbdbg_xpm);
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user