This commit is contained in:
Robbbert 2015-12-27 23:53:15 +11:00
commit 88e4fea8db
2 changed files with 28 additions and 9 deletions

View File

@ -321,6 +321,12 @@ project ("qtdbg_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/modules/render", MAME_DIR .. "src/osd/modules/render",
MAME_DIR .. "3rdparty", MAME_DIR .. "3rdparty",
} }
configuration { "linux-*" }
buildoptions {
"-fPIC",
}
configuration { }
qtdebuggerbuild() qtdebuggerbuild()
project ("osd_" .. _OPTIONS["osd"]) project ("osd_" .. _OPTIONS["osd"])
@ -384,7 +390,7 @@ project ("osd_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/modules/debugger/osx/registersview.mm", MAME_DIR .. "src/osd/modules/debugger/osx/registersview.mm",
MAME_DIR .. "src/osd/modules/debugger/osx/registersview.h", MAME_DIR .. "src/osd/modules/debugger/osx/registersview.h",
MAME_DIR .. "src/osd/modules/debugger/osx/watchpointsview.mm", MAME_DIR .. "src/osd/modules/debugger/osx/watchpointsview.mm",
MAME_DIR .. "src/osd/modules/debugger/osx/watchpointsview.h", MAME_DIR .. "src/osd/modules/debugger/osx/watchpointsview.h",
MAME_DIR .. "src/osd/modules/debugger/osx/debugosx.h", MAME_DIR .. "src/osd/modules/debugger/osx/debugosx.h",
} }
if _OPTIONS["SDL_LIBVER"]=="sdl" then if _OPTIONS["SDL_LIBVER"]=="sdl" then
@ -453,7 +459,7 @@ project ("ocore_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/sdl/sdlsocket.cpp", MAME_DIR .. "src/osd/sdl/sdlsocket.cpp",
MAME_DIR .. "src/osd/sdl/sdlos_" .. SDLOS_TARGETOS .. ".cpp", MAME_DIR .. "src/osd/sdl/sdlos_" .. SDLOS_TARGETOS .. ".cpp",
MAME_DIR .. "src/osd/modules/osdmodule.cpp", MAME_DIR .. "src/osd/modules/osdmodule.cpp",
MAME_DIR .. "src/osd/modules/osdmodule.h", MAME_DIR .. "src/osd/modules/osdmodule.h",
MAME_DIR .. "src/osd/modules/lib/osdlib_" .. SDLOS_TARGETOS .. ".cpp", MAME_DIR .. "src/osd/modules/lib/osdlib_" .. SDLOS_TARGETOS .. ".cpp",
MAME_DIR .. "src/osd/modules/lib/osdlib.h", MAME_DIR .. "src/osd/modules/lib/osdlib.h",
MAME_DIR .. "src/osd/modules/sync/sync_" .. SYNC_IMPLEMENTATION .. ".cpp", MAME_DIR .. "src/osd/modules/sync/sync_" .. SYNC_IMPLEMENTATION .. ".cpp",
@ -488,9 +494,9 @@ if _OPTIONS["with-tools"] then
kind "ConsoleApp" kind "ConsoleApp"
flags { flags {
"Symbols", -- always include minimum symbols for executables "Symbols", -- always include minimum symbols for executables
} }
dofile("sdl_cfg.lua") dofile("sdl_cfg.lua")
includedirs { includedirs {
@ -498,7 +504,7 @@ if _OPTIONS["with-tools"] then
MAME_DIR .. "src/lib/util", MAME_DIR .. "src/lib/util",
} }
if _OPTIONS["SEPARATE_BIN"]~="1" then if _OPTIONS["SEPARATE_BIN"]~="1" then
targetdir(MAME_DIR) targetdir(MAME_DIR)
end end
@ -549,12 +555,12 @@ if _OPTIONS["targetos"] == "macosx" and _OPTIONS["with-tools"] then
kind "ConsoleApp" kind "ConsoleApp"
flags { flags {
"Symbols", -- always include minimum symbols for executables "Symbols", -- always include minimum symbols for executables
} }
dofile("sdl_cfg.lua") dofile("sdl_cfg.lua")
if _OPTIONS["SEPARATE_BIN"]~="1" then if _OPTIONS["SEPARATE_BIN"]~="1" then
targetdir(MAME_DIR) targetdir(MAME_DIR)
end end

View File

@ -18,6 +18,8 @@
#include <vector> #include <vector>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtCore/QAbstractEventDispatcher>
#include <QtCore/QAbstractNativeEventFilter>
#include "emu.h" #include "emu.h"
#include "config.h" #include "config.h"
@ -33,6 +35,9 @@
#include "qt/deviceinformationwindow.h" #include "qt/deviceinformationwindow.h"
class debug_qt : public osd_module, public debug_module class debug_qt : public osd_module, public debug_module
#if defined(WIN32) && !defined(SDLMAME_WIN32)
, public QAbstractNativeEventFilter
#endif
{ {
public: public:
debug_qt() debug_qt()
@ -49,7 +54,9 @@ public:
virtual void init_debugger(running_machine &machine); virtual void init_debugger(running_machine &machine);
virtual void wait_for_debugger(device_t &device, bool firststop); virtual void wait_for_debugger(device_t &device, bool firststop);
virtual void debugger_update(); virtual void debugger_update();
#if defined(WIN32) && !defined(SDLMAME_WIN32)
virtual bool nativeEventFilter(const QByteArray &eventType, void *message, long *) Q_DECL_OVERRIDE;
#endif
private: private:
running_machine *m_machine; running_machine *m_machine;
}; };
@ -231,6 +238,12 @@ static void bring_main_window_to_front()
#if defined(WIN32) && !defined(SDLMAME_WIN32) #if defined(WIN32) && !defined(SDLMAME_WIN32)
bool winwindow_qt_filter(void *message); bool winwindow_qt_filter(void *message);
bool debug_qt::nativeEventFilter(const QByteArray &eventType, void *message, long *)
{
winwindow_qt_filter(message);
return false;
}
#endif #endif
void debug_qt::init_debugger(running_machine &machine) void debug_qt::init_debugger(running_machine &machine)
@ -240,7 +253,7 @@ void debug_qt::init_debugger(running_machine &machine)
// If you're starting from scratch, create a new qApp // If you're starting from scratch, create a new qApp
new QApplication(qtArgc, qtArgv); new QApplication(qtArgc, qtArgv);
#if defined(WIN32) && !defined(SDLMAME_WIN32) #if defined(WIN32) && !defined(SDLMAME_WIN32)
QAbstractEventDispatcher::instance()->setEventFilter((QAbstractEventDispatcher::EventFilter)&winwindow_qt_filter); QAbstractEventDispatcher::instance()->installNativeEventFilter(this);
#endif #endif
} }
else else