#endif
//write_log (_T("setmouseactive %d->%d showcursor=%d focus=%d recap=%d\n"), mouseactive, active, showcursor, focus, recapture);
+
if (active == 0)
releasecapture ();
if (mouseactive == active && active >= 0)
if (mouseactive) {
if (focus) {
+ if (GetActiveWindow() != mon->hMainWnd && GetActiveWindow() != mon->hAmigaWnd)
+ SetActiveWindow(mon->hMainWnd);
if (!showcursor) {
//write_log(_T("setcapture\n"));
#if MOUSECLIP_HIDE
{
struct threadpriorities *pri;
- //write_log (_T("winuae_active(%d)\n"), minimized);
+ //write_log (_T("winuae_active(%p,%d)\n"), hwnd, minimized);
+
monitor_off = 0;
/* without this returning from hibernate-mode causes wrong timing
*/
void minimizewindow(int monid)
{
struct AmigaMonitor *mon = &AMonitors[monid];
- ShowWindow (mon->hMainWnd, SW_MINIMIZE);
+ if (mon->screen_is_initialized)
+ ShowWindow (mon->hMainWnd, SW_MINIMIZE);
}
void enablecapture(int monid)
write_log(_T("WM_ACTIVATEAPP active %p\n"), hWnd);
D3D_resize(0, 1);
}
- if (!wParam && isfullscreen() <= 0 && currprefs.win32_minimize_inactive) {
+ if (!wParam && isfullscreen() <= 0 && currprefs.win32_minimize_inactive && !gui_active) {
minimizewindow(mon->monitor_id);
}
#ifdef RETROPLATFORM
{
MINIDUMP_EXCEPTION_INFORMATION exinfo;
MINIDUMP_USER_STREAM_INFORMATION musi, *musip;
- MINIDUMP_USER_STREAM mus[2], *musp;
+ MINIDUMP_USER_STREAM mus[3], *musp;
uae_u8 *log;
- int loglen;
+ int len;
musip = NULL;
- loglen = 30000;
- log = save_log (TRUE, &loglen);
+ musi.UserStreamArray = mus;
+ musi.UserStreamCount = 0;
+
+ len = 30000;
+ log = save_log (TRUE, &len);
if (log) {
- musi.UserStreamArray = mus;
- musi.UserStreamCount = 1;
- musp = &mus[0];
- musp->Type = LastReservedStream + 1;
+ musp = &mus[musi.UserStreamCount];
+ musi.UserStreamCount++;
+ musp->Type = LastReservedStream + musi.UserStreamCount;
musp->Buffer = log;
- musp->BufferSize = loglen;
- musip = &musi;
- loglen = 30000;
- log = save_log (FALSE, &loglen);
+ musp->BufferSize = len;
+ len = 30000;
+ log = save_log (FALSE, &len);
if (log) {
+ musp = &mus[musi.UserStreamCount];
musi.UserStreamCount++;
- musp = &mus[1];
- musp->Type = LastReservedStream + 2;
+ musp->Type = LastReservedStream + musi.UserStreamCount;
musp->Buffer = log;
- musp->BufferSize = loglen;
+ musp->BufferSize = len;
}
}
+
+ const TCHAR *config = cfgfile_getconfigdata(&len);
+ if (config && len > 0) {
+ musp = &mus[musi.UserStreamCount];
+ musi.UserStreamCount++;
+ musp->Type = LastReservedStream + musi.UserStreamCount;
+ musp->Buffer = (void*)config;
+ musp->BufferSize = len;
+ }
+
+ if (musi.UserStreamCount > 0)
+ musip = &musi;
+
exinfo.ThreadId = GetCurrentThreadId ();
exinfo.ExceptionPointers = pExceptionPointers;
exinfo.ClientPointers = 0;
_stprintf (msg, _T("Crash detected. MiniDump saved as:\n%s\n"), path3);
MessageBox (NULL, msg, _T("Crash"), MB_OK | MB_ICONWARNING | MB_TASKMODAL | MB_SETFOREGROUND);
}
- HANDLE h = GetCurrentProcess();
- TerminateProcess(h, 0);
- WaitForSingleObject(h, INFINITE);
+ ExitProcess(0);
}
}
all_events_disabled = 0;