Revert "Fix recursive faults in Window crash logger due to message box event loop."
This reverts commit 2b1b7f8b135968cb88d8e65fcb89cdff8d203838.
Replaced by b5ca2161d9
.
This commit is contained in:
@@ -51,20 +51,6 @@ extern GameMode _game_mode;
|
|||||||
extern SwitchMode _switch_mode;
|
extern SwitchMode _switch_mode;
|
||||||
extern bool _exit_game;
|
extern bool _exit_game;
|
||||||
|
|
||||||
#if defined(WIN32)
|
|
||||||
extern bool _in_event_loop_post_crash;
|
|
||||||
|
|
||||||
inline bool InEventLoopPostCrash()
|
|
||||||
{
|
|
||||||
return _in_event_loop_post_crash;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
inline bool InEventLoopPostCrash()
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/** Modes of pausing we've got */
|
/** Modes of pausing we've got */
|
||||||
enum PauseMode : byte {
|
enum PauseMode : byte {
|
||||||
PM_UNPAUSED = 0, ///< A normal unpaused game
|
PM_UNPAUSED = 0, ///< A normal unpaused game
|
||||||
|
@@ -19,7 +19,6 @@
|
|||||||
#include "../../gamelog.h"
|
#include "../../gamelog.h"
|
||||||
#include "../../saveload/saveload.h"
|
#include "../../saveload/saveload.h"
|
||||||
#include "../../video/video_driver.hpp"
|
#include "../../video/video_driver.hpp"
|
||||||
#include "../../openttd.h"
|
|
||||||
#include "../../screenshot.h"
|
#include "../../screenshot.h"
|
||||||
#include "../../debug.h"
|
#include "../../debug.h"
|
||||||
#include "../../settings_type.h"
|
#include "../../settings_type.h"
|
||||||
@@ -618,8 +617,6 @@ void *_safe_esp = nullptr;
|
|||||||
|
|
||||||
static LONG WINAPI ExceptionHandler(EXCEPTION_POINTERS *ep)
|
static LONG WINAPI ExceptionHandler(EXCEPTION_POINTERS *ep)
|
||||||
{
|
{
|
||||||
_in_event_loop_post_crash = true;
|
|
||||||
|
|
||||||
if (CrashLogWindows::current != nullptr) {
|
if (CrashLogWindows::current != nullptr) {
|
||||||
CrashLog::AfterCrashLogCleanup();
|
CrashLog::AfterCrashLogCleanup();
|
||||||
ExitProcess(2);
|
ExitProcess(2);
|
||||||
|
@@ -38,8 +38,6 @@
|
|||||||
|
|
||||||
#include "../../safeguards.h"
|
#include "../../safeguards.h"
|
||||||
|
|
||||||
bool _in_event_loop_post_crash;
|
|
||||||
|
|
||||||
static bool _has_console;
|
static bool _has_console;
|
||||||
static bool _cursor_disable = true;
|
static bool _cursor_disable = true;
|
||||||
static bool _cursor_visible = true;
|
static bool _cursor_visible = true;
|
||||||
@@ -102,7 +100,6 @@ bool LoadLibraryList(Function proc[], const char *dll)
|
|||||||
|
|
||||||
void ShowOSErrorBox(const char *buf, bool system)
|
void ShowOSErrorBox(const char *buf, bool system)
|
||||||
{
|
{
|
||||||
_in_event_loop_post_crash = true;
|
|
||||||
MyShowCursor(true);
|
MyShowCursor(true);
|
||||||
MessageBox(GetActiveWindow(), OTTD2FS(buf), _T("Error!"), MB_ICONSTOP | MB_TASKMODAL);
|
MessageBox(GetActiveWindow(), OTTD2FS(buf), _T("Error!"), MB_ICONSTOP | MB_TASKMODAL);
|
||||||
}
|
}
|
||||||
|
@@ -2714,8 +2714,6 @@ bool FocusWindowById(WindowClass cls, WindowNumber number)
|
|||||||
*/
|
*/
|
||||||
void HandleKeypress(uint keycode, WChar key)
|
void HandleKeypress(uint keycode, WChar key)
|
||||||
{
|
{
|
||||||
if (InEventLoopPostCrash()) return;
|
|
||||||
|
|
||||||
/* World generation is multithreaded and messes with companies.
|
/* World generation is multithreaded and messes with companies.
|
||||||
* But there is no company related window open anyway, so _current_company is not used. */
|
* But there is no company related window open anyway, so _current_company is not used. */
|
||||||
assert(HasModalProgress() || IsLocalCompany());
|
assert(HasModalProgress() || IsLocalCompany());
|
||||||
@@ -2934,8 +2932,6 @@ static void HandleKeyScrolling()
|
|||||||
|
|
||||||
static void MouseLoop(MouseClick click, int mousewheel)
|
static void MouseLoop(MouseClick click, int mousewheel)
|
||||||
{
|
{
|
||||||
if (InEventLoopPostCrash()) return;
|
|
||||||
|
|
||||||
/* World generation is multithreaded and messes with companies.
|
/* World generation is multithreaded and messes with companies.
|
||||||
* But there is no company related window open anyway, so _current_company is not used. */
|
* But there is no company related window open anyway, so _current_company is not used. */
|
||||||
assert(HasModalProgress() || IsLocalCompany());
|
assert(HasModalProgress() || IsLocalCompany());
|
||||||
@@ -3042,8 +3038,6 @@ static void MouseLoop(MouseClick click, int mousewheel)
|
|||||||
*/
|
*/
|
||||||
void HandleMouseEvents()
|
void HandleMouseEvents()
|
||||||
{
|
{
|
||||||
if (InEventLoopPostCrash()) return;
|
|
||||||
|
|
||||||
/* World generation is multithreaded and messes with companies.
|
/* World generation is multithreaded and messes with companies.
|
||||||
* But there is no company related window open anyway, so _current_company is not used. */
|
* But there is no company related window open anyway, so _current_company is not used. */
|
||||||
assert(HasModalProgress() || IsLocalCompany());
|
assert(HasModalProgress() || IsLocalCompany());
|
||||||
@@ -3153,8 +3147,6 @@ static void CheckSoftLimit()
|
|||||||
*/
|
*/
|
||||||
void InputLoop()
|
void InputLoop()
|
||||||
{
|
{
|
||||||
if (InEventLoopPostCrash()) return;
|
|
||||||
|
|
||||||
/* World generation is multithreaded and messes with companies.
|
/* World generation is multithreaded and messes with companies.
|
||||||
* But there is no company related window open anyway, so _current_company is not used. */
|
* But there is no company related window open anyway, so _current_company is not used. */
|
||||||
assert(HasModalProgress() || IsLocalCompany());
|
assert(HasModalProgress() || IsLocalCompany());
|
||||||
|
Reference in New Issue
Block a user