diff options
author | therealmogminer@gmail.com <therealmogminer@gmail.com> | 2016-06-08 08:10:55 +1000 |
---|---|---|
committer | Vas Crabb <vas@vastheman.com> | 2016-06-08 08:10:55 +1000 |
commit | 56bd36c5ef3960874628bc08cbfcedf4c6057a19 (patch) | |
tree | 3cce04b8c27b773befde51785210bc83673f9fd0 /src/osd/windows/winmain.cpp | |
parent | bf281b3cad1d05c6ef863fa179d3d6ab442a163c (diff) |
Major refactoring of debugger core [Ryan Holtz]
* Eliminate globals/file statics
* Remove lots of stuff from global scope
* Use std::function for custom command registration
* Eliminate some trampolines
* Build fixes from Vas Crabb and balr0g
Diffstat (limited to 'src/osd/windows/winmain.cpp')
-rw-r--r-- | src/osd/windows/winmain.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/osd/windows/winmain.cpp b/src/osd/windows/winmain.cpp index 1dcb10e2e37..4a4cd95defa 100644 --- a/src/osd/windows/winmain.cpp +++ b/src/osd/windows/winmain.cpp @@ -6,6 +6,9 @@ // //============================================================ +// only for oslog callback +#include <functional> + // standard windows headers #define WIN32_LEAN_AND_MEAN #include <windows.h> @@ -418,7 +421,7 @@ windows_options::windows_options() // output_oslog //============================================================ -static void output_oslog(const running_machine &machine, const char *buffer) +void windows_osd_interface::output_oslog(const char *buffer) { if (IsDebuggerPresent()) win_output_debug_string_utf8(buffer); @@ -523,7 +526,10 @@ void windows_osd_interface::init(running_machine &machine) // hook up the debugger log if (options.oslog()) - machine.add_logerror_callback(output_oslog); + { + using namespace std::placeholders; + machine.add_logerror_callback(std::bind(&windows_osd_interface::output_oslog, this, _1)); + } #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) // crank up the multimedia timer resolution to its max |