MCPcopy Create free account
hub / github.com/GrapheneCt/NetStream / OpenError

Method OpenError

NetStream/source/dialog.cpp:95–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95void dialog::OpenError(Plugin *workPlugin, int32_t errorCode, const wchar_t *messageText)
96{
97 if (s_currentDialog != CURRENT_DIALOG_NONE)
98 return;
99
100 bool isMainThread = thread::ThreadIDCache::Check();
101
102 CommonGuiDialog::ErrorDialog dialog;
103
104 auto cb = new CommonGuiDialog::EventCBListener(CommonGuiEventHandler, NULL);
105
106 dialog.work_plugin = workPlugin;
107 dialog.error = errorCode;
108 dialog.listener = cb;
109 if (messageText)
110 dialog.message = messageText;
111
112 if (!isMainThread)
113 thread::RMutex::MainThreadMutex()->Lock();
114
115 s_currentDialog = dialog.Show();
116 s_currentPlugin = workPlugin;
117
118 if (!isMainThread)
119 thread::RMutex::MainThreadMutex()->Unlock();
120}
121
122void dialog::OpenThreeButton(
123 Plugin *workPlugin,

Callers

nothing calls this directly

Calls 2

LockMethod · 0.80
UnlockMethod · 0.80

Tested by

no test coverage detected