mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
feat: Display titlebar buttons when not running borderless (#1099)
Tested on Linux (non-borderless) and Windows (borderless) You may want to also test it just to be sure
This commit is contained in:
@@ -13,31 +13,6 @@
|
||||
|
||||
namespace hex::plugin::windows {
|
||||
|
||||
void addTitleBarButtons() {
|
||||
#if defined(DEBUG)
|
||||
ContentRegistry::Interface::addTitleBarButton(ICON_VS_DEBUG, "hex.windows.title_bar_button.debug_build", []{
|
||||
if (ImGui::GetIO().KeyCtrl) {
|
||||
// Explicitly trigger a segfault by writing to an invalid memory location
|
||||
// Used for debugging crashes
|
||||
*reinterpret_cast<u8 *>(0x10) = 0x10;
|
||||
std::unreachable();
|
||||
} else if (ImGui::GetIO().KeyShift) {
|
||||
// Explicitly trigger an abort by throwing an uncaught exception
|
||||
// Used for debugging exception errors
|
||||
throw std::runtime_error("Debug Error");
|
||||
std::unreachable();
|
||||
} else {
|
||||
hex::openWebpage("https://imhex.werwolv.net/debug");
|
||||
}
|
||||
});
|
||||
#endif
|
||||
|
||||
ContentRegistry::Interface::addTitleBarButton(ICON_VS_SMILEY, "hex.windows.title_bar_button.feedback", []{
|
||||
hex::openWebpage("https://github.com/WerWolv/ImHex/discussions/categories/feedback");
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
void addFooterItems() {
|
||||
|
||||
ContentRegistry::Interface::addFooterItem([] {
|
||||
|
||||
Reference in New Issue
Block a user