mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Stop some UI elements from opening when the game's not loaded
This commit is contained in:
parent
859e124f1a
commit
a4fe83ea20
3 changed files with 21 additions and 0 deletions
|
@ -954,6 +954,12 @@ void CtrlDisAsmView::onMouseUp(WPARAM wParam, LPARAM lParam, int button)
|
||||||
}
|
}
|
||||||
else if (button == 2)
|
else if (button == 2)
|
||||||
{
|
{
|
||||||
|
// We don't want to let the users play with deallocated or uninitialized debugging objects
|
||||||
|
GlobalUIState state = GetUIState();
|
||||||
|
if (state != UISTATE_INGAME && state != UISTATE_PAUSEMENU) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch (TriggerContextMenu(ContextMenuID::DISASM, wnd, ContextPoint::FromEvent(lParam)))
|
switch (TriggerContextMenu(ContextMenuID::DISASM, wnd, ContextPoint::FromEvent(lParam)))
|
||||||
{
|
{
|
||||||
case ID_DISASM_GOTOINMEMORYVIEW:
|
case ID_DISASM_GOTOINMEMORYVIEW:
|
||||||
|
|
|
@ -311,6 +311,12 @@ void CtrlDisplayListView::onMouseUp(WPARAM wParam, LPARAM lParam, int button)
|
||||||
HMENU menu = GetContextMenu(ContextMenuID::DISPLAYLISTVIEW);
|
HMENU menu = GetContextMenu(ContextMenuID::DISPLAYLISTVIEW);
|
||||||
EnableMenuItem(menu, ID_GEDBG_SETCOND, GPUBreakpoints::IsAddressBreakpoint(curAddress) ? MF_ENABLED : MF_GRAYED);
|
EnableMenuItem(menu, ID_GEDBG_SETCOND, GPUBreakpoints::IsAddressBreakpoint(curAddress) ? MF_ENABLED : MF_GRAYED);
|
||||||
|
|
||||||
|
// We don't want to let the users play with deallocated or uninitialized debugging objects
|
||||||
|
GlobalUIState state = GetUIState();
|
||||||
|
if (state != UISTATE_INGAME && state != UISTATE_PAUSEMENU) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch (TriggerContextMenu(ContextMenuID::DISPLAYLISTVIEW, wnd, ContextPoint::FromEvent(lParam)))
|
switch (TriggerContextMenu(ContextMenuID::DISPLAYLISTVIEW, wnd, ContextPoint::FromEvent(lParam)))
|
||||||
{
|
{
|
||||||
case ID_DISASM_GOTOINMEMORYVIEW:
|
case ID_DISASM_GOTOINMEMORYVIEW:
|
||||||
|
|
|
@ -27,6 +27,8 @@
|
||||||
#include "Windows/GEDebugger/SimpleGLWindow.h"
|
#include "Windows/GEDebugger/SimpleGLWindow.h"
|
||||||
#include "Windows/W32Util/ContextMenu.h"
|
#include "Windows/W32Util/ContextMenu.h"
|
||||||
|
|
||||||
|
#include "Core/System.h"
|
||||||
|
|
||||||
const wchar_t *SimpleGLWindow::windowClass = L"SimpleGLWindow";
|
const wchar_t *SimpleGLWindow::windowClass = L"SimpleGLWindow";
|
||||||
|
|
||||||
using namespace Lin;
|
using namespace Lin;
|
||||||
|
@ -591,6 +593,13 @@ bool SimpleGLWindow::RightClick(int mouseX, int mouseY) {
|
||||||
POINT pos = PosFromMouse(mouseX, mouseY);
|
POINT pos = PosFromMouse(mouseX, mouseY);
|
||||||
|
|
||||||
rightClickCallback_(0, pos.x, pos.y);
|
rightClickCallback_(0, pos.x, pos.y);
|
||||||
|
|
||||||
|
// We don't want to let the users play with deallocated or uninitialized debugging objects
|
||||||
|
GlobalUIState state = GetUIState();
|
||||||
|
if (state != UISTATE_INGAME && state != UISTATE_PAUSEMENU) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
int result = TriggerContextMenu(rightClickMenu_, hWnd_, ContextPoint::FromClient(pt));
|
int result = TriggerContextMenu(rightClickMenu_, hWnd_, ContextPoint::FromClient(pt));
|
||||||
if (result > 0) {
|
if (result > 0) {
|
||||||
rightClickCallback_(result, pos.x, pos.y);
|
rightClickCallback_(result, pos.x, pos.y);
|
||||||
|
|
Loading…
Add table
Reference in a new issue