Ensure to lock emulator with accessing bookmark preview popup.
This commit is contained in:
parent
9633f081ca
commit
9e1564df0d
|
@ -28,28 +28,9 @@ Bookmarks/Branches - Manager of Bookmarks
|
||||||
#include "Qt/TasEditor/TasEditorWindow.h"
|
#include "Qt/TasEditor/TasEditorWindow.h"
|
||||||
#include "Qt/TasEditor/TasColors.h"
|
#include "Qt/TasEditor/TasColors.h"
|
||||||
|
|
||||||
//#pragma comment(lib, "msimg32.lib")
|
|
||||||
|
|
||||||
//LRESULT APIENTRY BookmarksListWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
|
||||||
//WNDPROC hwndBookmarksList_oldWndProc;
|
|
||||||
|
|
||||||
//extern TASEDITOR_CONFIG taseditorConfig;
|
|
||||||
//extern TASEDITOR_WINDOW taseditorWindow;
|
|
||||||
//extern POPUP_DISPLAY popupDisplay;
|
|
||||||
//extern PLAYBACK playback;
|
|
||||||
//extern RECORDER recorder;
|
|
||||||
//extern SELECTION selection;
|
|
||||||
//extern GREENZONE greenzone;
|
|
||||||
//extern TASEDITOR_PROJECT project;
|
|
||||||
//extern HISTORY history;
|
|
||||||
//extern PIANO_ROLL pianoRoll;
|
|
||||||
//extern MARKERS_MANAGER markersManager;
|
|
||||||
//extern BRANCHES branches;
|
|
||||||
|
|
||||||
// resources
|
// resources
|
||||||
static char bookmarks_save_id[BOOKMARKS_ID_LEN] = "BOOKMARKS";
|
static char bookmarks_save_id[BOOKMARKS_ID_LEN] = "BOOKMARKS";
|
||||||
static char bookmarks_skipsave_id[BOOKMARKS_ID_LEN] = "BOOKMARKX";
|
static char bookmarks_skipsave_id[BOOKMARKS_ID_LEN] = "BOOKMARKX";
|
||||||
//char bookmarksCaption[3][23] = { " Bookmarks ", " Bookmarks / Branches ", " Branches " };
|
|
||||||
// color tables for flashing when saving/loading bookmarks
|
// color tables for flashing when saving/loading bookmarks
|
||||||
//COLORREF bookmark_flash_colors[TOTAL_BOOKMARK_COMMANDS][FLASH_PHASE_MAX+1] = {
|
//COLORREF bookmark_flash_colors[TOTAL_BOOKMARK_COMMANDS][FLASH_PHASE_MAX+1] = {
|
||||||
// // set
|
// // set
|
||||||
|
@ -144,6 +125,7 @@ void BOOKMARKS::setFont( QFont &newFont )
|
||||||
|
|
||||||
void BOOKMARKS::calcFontData(void)
|
void BOOKMARKS::calcFontData(void)
|
||||||
{
|
{
|
||||||
|
int w,h;
|
||||||
QWidget::setFont(font);
|
QWidget::setFont(font);
|
||||||
QFontMetrics metrics(font);
|
QFontMetrics metrics(font);
|
||||||
#if QT_VERSION > QT_VERSION_CHECK(5, 11, 0)
|
#if QT_VERSION > QT_VERSION_CHECK(5, 11, 0)
|
||||||
|
@ -171,11 +153,12 @@ void BOOKMARKS::calcFontData(void)
|
||||||
pxStartCol2 = pxWidthCol1;
|
pxStartCol2 = pxWidthCol1;
|
||||||
pxStartCol3 = pxWidthCol1 + pxWidthFrameCol;
|
pxStartCol3 = pxWidthCol1 + pxWidthFrameCol;
|
||||||
|
|
||||||
viewWidth = pxLineWidth;
|
w = pxLineWidth;
|
||||||
viewHeight = pxLineSpacing * TOTAL_BOOKMARKS;
|
h = pxLineSpacing * TOTAL_BOOKMARKS;
|
||||||
|
|
||||||
setMinimumWidth( viewWidth );
|
setMinimumWidth( w );
|
||||||
setMinimumHeight( viewHeight );
|
setMinimumHeight( h );
|
||||||
|
resize(w,h);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BOOKMARKS::update()
|
void BOOKMARKS::update()
|
||||||
|
@ -799,6 +782,7 @@ void BOOKMARKS::mouseReleaseEvent(QMouseEvent * event)
|
||||||
|
|
||||||
void BOOKMARKS::showImage(void)
|
void BOOKMARKS::showImage(void)
|
||||||
{
|
{
|
||||||
|
fceuCriticalSection emuLock;
|
||||||
static_cast<bookmarkPreviewPopup*>(fceuCustomToolTipShow( imagePos, new bookmarkPreviewPopup(imageItem, this) ));
|
static_cast<bookmarkPreviewPopup*>(fceuCustomToolTipShow( imagePos, new bookmarkPreviewPopup(imageItem, this) ));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,20 +32,6 @@ Branches - Manager of Branches
|
||||||
#include "Qt/TasEditor/TasEditorWindow.h"
|
#include "Qt/TasEditor/TasEditorWindow.h"
|
||||||
|
|
||||||
|
|
||||||
//LRESULT APIENTRY BranchesBitmapWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
|
||||||
//WNDPROC hwndBranchesBitmap_oldWndProc;
|
|
||||||
|
|
||||||
//extern TASEDITOR_CONFIG taseditorConfig;
|
|
||||||
//extern TASEDITOR_WINDOW taseditorWindow;
|
|
||||||
//extern POPUP_DISPLAY popupDisplay;
|
|
||||||
//extern PLAYBACK playback;
|
|
||||||
//extern SELECTION selection;
|
|
||||||
//extern GREENZONE greenzone;
|
|
||||||
//extern TASEDITOR_PROJECT project;
|
|
||||||
//extern HISTORY history;
|
|
||||||
//extern PIANO_ROLL pianoRoll;
|
|
||||||
//extern BOOKMARKS bookmarks;
|
|
||||||
|
|
||||||
//extern COLORREF bookmark_flash_colors[TOTAL_BOOKMARK_COMMANDS][FLASH_PHASE_MAX+1];
|
//extern COLORREF bookmark_flash_colors[TOTAL_BOOKMARK_COMMANDS][FLASH_PHASE_MAX+1];
|
||||||
|
|
||||||
// resources
|
// resources
|
||||||
|
@ -69,6 +55,9 @@ BRANCHES::BRANCHES(QWidget *parent)
|
||||||
this->setMinimumWidth(BRANCHES_BITMAP_WIDTH);
|
this->setMinimumWidth(BRANCHES_BITMAP_WIDTH);
|
||||||
this->setMinimumHeight(BRANCHES_BITMAP_HEIGHT);
|
this->setMinimumHeight(BRANCHES_BITMAP_HEIGHT);
|
||||||
|
|
||||||
|
viewWidth = BRANCHES_BITMAP_WIDTH;
|
||||||
|
viewHeight = BRANCHES_BITMAP_HEIGHT;
|
||||||
|
|
||||||
g_config->getOption("SDL.TasBranchesFont", &fontString);
|
g_config->getOption("SDL.TasBranchesFont", &fontString);
|
||||||
|
|
||||||
if ( fontString.size() > 0 )
|
if ( fontString.size() > 0 )
|
||||||
|
@ -567,6 +556,7 @@ void BRANCHES::mouseReleaseEvent(QMouseEvent * event)
|
||||||
|
|
||||||
void BRANCHES::showImage(void)
|
void BRANCHES::showImage(void)
|
||||||
{
|
{
|
||||||
|
fceuCriticalSection emuLock;
|
||||||
static_cast<bookmarkPreviewPopup*>(fceuCustomToolTipShow( imagePos, new bookmarkPreviewPopup(imageItem, this) ));
|
static_cast<bookmarkPreviewPopup*>(fceuCustomToolTipShow( imagePos, new bookmarkPreviewPopup(imageItem, this) ));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -648,8 +638,8 @@ void BRANCHES::paintEvent(QPaintEvent *event)
|
||||||
|
|
||||||
QPainter painter(this);
|
QPainter painter(this);
|
||||||
|
|
||||||
viewWidth = event->rect().width();
|
//viewWidth = event->rect().width();
|
||||||
viewHeight = event->rect().height();
|
//viewHeight = event->rect().height();
|
||||||
|
|
||||||
// // draw background
|
// // draw background
|
||||||
QLinearGradient linearGrad(QPointF(0, 0), QPointF(viewWidth, viewHeight));
|
QLinearGradient linearGrad(QPointF(0, 0), QPointF(viewWidth, viewHeight));
|
||||||
|
|
Loading…
Reference in New Issue