mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Improve checks
This commit is contained in:
parent
b2729507a1
commit
02eb10649d
4 changed files with 11 additions and 9 deletions
|
@ -248,7 +248,9 @@ void GPU_GLES::BeginHostFrame() {
|
|||
textureCache_->StartFrame();
|
||||
|
||||
// Save the cache from time to time. TODO: How often? We save on exit, so shouldn't need to do this all that often.
|
||||
if (shaderCachePath_.Valid() && (gpuStats.numFlips & 32767) == 0 && coreState == CORE_RUNNING) {
|
||||
|
||||
const int saveShaderCacheFrameInterval = 32767; // power of 2 - 1. About every 10 minutes at 60fps.
|
||||
if (shaderCachePath_.Valid() && !(gpuStats.numFlips & saveShaderCacheFrameInterval) && coreState == CORE_RUNNING) {
|
||||
shaderManagerGL_->SaveCache(shaderCachePath_, &drawEngine_);
|
||||
}
|
||||
shaderManagerGL_->DirtyLastShader();
|
||||
|
|
|
@ -279,7 +279,7 @@ void CtrlDisplayListView::PromptBreakpointCond() {
|
|||
|
||||
void CtrlDisplayListView::onMouseDown(WPARAM wParam, LPARAM lParam, int button)
|
||||
{
|
||||
if (!validDisplayList) {
|
||||
if (!validDisplayList || !gpuDebug) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -310,7 +310,7 @@ void CtrlDisplayListView::onMouseDown(WPARAM wParam, LPARAM lParam, int button)
|
|||
|
||||
void CtrlDisplayListView::onMouseUp(WPARAM wParam, LPARAM lParam, int button)
|
||||
{
|
||||
if (!validDisplayList) {
|
||||
if (!validDisplayList || !gpuDebug) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -319,12 +319,6 @@ void CtrlDisplayListView::onMouseUp(WPARAM wParam, LPARAM lParam, int button)
|
|||
HMENU menu = GetContextMenu(ContextMenuID::DISPLAYLISTVIEW);
|
||||
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)))
|
||||
{
|
||||
case ID_DISASM_GOTOINMEMORYVIEW:
|
||||
|
|
|
@ -56,6 +56,10 @@ public:
|
|||
list = displayList;
|
||||
gotoAddr(list.pc);
|
||||
}
|
||||
void clearDisplayList()
|
||||
{
|
||||
validDisplayList = false;
|
||||
}
|
||||
|
||||
void scrollWindow(int lines)
|
||||
{
|
||||
|
|
|
@ -87,6 +87,8 @@ static void UpdateDisplayListTab(GEDebuggerTab *tab, TabControl *tabs, GETabPosi
|
|||
DisplayList list;
|
||||
if (gpuDebug != nullptr && gpuDebug->GetCurrentDisplayList(list)) {
|
||||
view->setDisplayList(list);
|
||||
} else {
|
||||
view->clearDisplayList();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue