mirror of
https://github.com/holub/mame
synced 2025-07-01 16:19:38 +03:00
With latest package from MSYS of clang 3.8.0 build at least compile fine on windows (nw)
Strange crashing while executing
This commit is contained in:
parent
e6142ef558
commit
679574e965
@ -22,11 +22,6 @@ project "gtest"
|
|||||||
"-Wno-unused-variable",
|
"-Wno-unused-variable",
|
||||||
}
|
}
|
||||||
|
|
||||||
configuration { "mingw-clang" }
|
|
||||||
buildoptions {
|
|
||||||
"-O0", -- crash of compiler when doing optimization
|
|
||||||
}
|
|
||||||
|
|
||||||
configuration { "vs*" }
|
configuration { "vs*" }
|
||||||
if _OPTIONS["vs"]=="intel-15" then
|
if _OPTIONS["vs"]=="intel-15" then
|
||||||
buildoptions {
|
buildoptions {
|
||||||
|
@ -115,8 +115,6 @@ protected:
|
|||||||
class dinput_keyboard_device : public dinput_device
|
class dinput_keyboard_device : public dinput_device
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
HANDLE m_dataEvent;
|
|
||||||
HANDLE m_exitEvent;
|
|
||||||
std::mutex m_device_lock;
|
std::mutex m_device_lock;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -124,7 +122,7 @@ public:
|
|||||||
|
|
||||||
dinput_keyboard_device(running_machine &machine, const char *name, input_module &module)
|
dinput_keyboard_device(running_machine &machine, const char *name, input_module &module)
|
||||||
: dinput_device(machine, name, DEVICE_CLASS_KEYBOARD, module),
|
: dinput_device(machine, name, DEVICE_CLASS_KEYBOARD, module),
|
||||||
keyboard({0})
|
keyboard({{0}})
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,8 +150,6 @@ class dinput_module : public wininput_module
|
|||||||
private:
|
private:
|
||||||
LPDIRECTINPUT m_dinput;
|
LPDIRECTINPUT m_dinput;
|
||||||
int m_dinput_version;
|
int m_dinput_version;
|
||||||
int didevtype_keyboard;
|
|
||||||
int didevtype_mouse;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
dinput_module(const char* type, const char* name)
|
dinput_module(const char* type, const char* name)
|
||||||
@ -493,7 +489,7 @@ public:
|
|||||||
|
|
||||||
dinput_joystick_device(running_machine &machine, const char *name, input_module &module)
|
dinput_joystick_device(running_machine &machine, const char *name, input_module &module)
|
||||||
: dinput_device(machine, name, DEVICE_CLASS_JOYSTICK, module),
|
: dinput_device(machine, name, DEVICE_CLASS_JOYSTICK, module),
|
||||||
joystick({0})
|
joystick({{0}})
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -263,7 +263,7 @@ public:
|
|||||||
|
|
||||||
rawinput_keyboard_device(running_machine& machine, const char* name, input_module& module)
|
rawinput_keyboard_device(running_machine& machine, const char* name, input_module& module)
|
||||||
: rawinput_device(machine, name, DEVICE_CLASS_KEYBOARD, module),
|
: rawinput_device(machine, name, DEVICE_CLASS_KEYBOARD, module),
|
||||||
keyboard({0})
|
keyboard({{0}})
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -549,8 +549,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
USHORT usagepage() { return 1; }
|
USHORT usagepage() override { return 1; }
|
||||||
USHORT usage() { return 6; }
|
USHORT usage() override { return 6; }
|
||||||
void add_rawinput_device(running_machine& machine, RAWINPUTDEVICELIST * device) override
|
void add_rawinput_device(running_machine& machine, RAWINPUTDEVICELIST * device) override
|
||||||
{
|
{
|
||||||
// make sure this is a keyboard
|
// make sure this is a keyboard
|
||||||
@ -596,8 +596,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
USHORT usagepage() { return 1; }
|
USHORT usagepage() override { return 1; }
|
||||||
USHORT usage() { return 2; }
|
USHORT usage() override { return 2; }
|
||||||
void add_rawinput_device(running_machine& machine, RAWINPUTDEVICELIST * device) override
|
void add_rawinput_device(running_machine& machine, RAWINPUTDEVICELIST * device) override
|
||||||
{
|
{
|
||||||
// make sure this is a mouse
|
// make sure this is a mouse
|
||||||
|
@ -45,7 +45,7 @@ public:
|
|||||||
|
|
||||||
win32_keyboard_device(running_machine& machine, const char *name, input_module &module)
|
win32_keyboard_device(running_machine& machine, const char *name, input_module &module)
|
||||||
: event_based_device(machine, name, DEVICE_CLASS_KEYBOARD, module),
|
: event_based_device(machine, name, DEVICE_CLASS_KEYBOARD, module),
|
||||||
keyboard({0})
|
keyboard({{0}})
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,7 +68,6 @@ protected:
|
|||||||
class keyboard_input_win32 : public wininput_module
|
class keyboard_input_win32 : public wininput_module
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
const osd_options * m_options;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
keyboard_input_win32()
|
keyboard_input_win32()
|
||||||
@ -138,7 +137,7 @@ public:
|
|||||||
win32_mouse_device(running_machine& machine, const char *name, input_module &module)
|
win32_mouse_device(running_machine& machine, const char *name, input_module &module)
|
||||||
: event_based_device(machine, name, DEVICE_CLASS_MOUSE, module),
|
: event_based_device(machine, name, DEVICE_CLASS_MOUSE, module),
|
||||||
mouse({0}),
|
mouse({0}),
|
||||||
win32_mouse({0})
|
win32_mouse({{0}})
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -172,10 +171,11 @@ public:
|
|||||||
void reset() override
|
void reset() override
|
||||||
{
|
{
|
||||||
memset(&mouse, 0, sizeof(mouse));
|
memset(&mouse, 0, sizeof(mouse));
|
||||||
|
memset(&win32_mouse, 0, sizeof(win32_mouse));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void process_event(MouseButtonEventArgs &args)
|
void process_event(MouseButtonEventArgs &args) override
|
||||||
{
|
{
|
||||||
// set the button state
|
// set the button state
|
||||||
mouse.rgbButtons[args.button] = args.keydown ? 0x80 : 0x00;
|
mouse.rgbButtons[args.button] = args.keydown ? 0x80 : 0x00;
|
||||||
@ -192,9 +192,6 @@ protected:
|
|||||||
|
|
||||||
class mouse_input_win32 : public wininput_module
|
class mouse_input_win32 : public wininput_module
|
||||||
{
|
{
|
||||||
private:
|
|
||||||
const osd_options * m_options;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
mouse_input_win32()
|
mouse_input_win32()
|
||||||
: wininput_module(OSD_MOUSEINPUT_PROVIDER, "win32")
|
: wininput_module(OSD_MOUSEINPUT_PROVIDER, "win32")
|
||||||
@ -301,7 +298,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void process_event(MouseButtonEventArgs &args)
|
void process_event(MouseButtonEventArgs &args) override
|
||||||
{
|
{
|
||||||
// Are we in shared axis mode?
|
// Are we in shared axis mode?
|
||||||
if (m_lightgun_shared_axis_mode)
|
if (m_lightgun_shared_axis_mode)
|
||||||
|
@ -187,7 +187,7 @@ private:
|
|||||||
public:
|
public:
|
||||||
xinput_joystick_device(running_machine &machine, const char *name, input_module &module)
|
xinput_joystick_device(running_machine &machine, const char *name, input_module &module)
|
||||||
: device_info(machine, name, DEVICE_CLASS_JOYSTICK, module),
|
: device_info(machine, name, DEVICE_CLASS_JOYSTICK, module),
|
||||||
gamepad({0}),
|
gamepad({{0}}),
|
||||||
xinput_state({0}),
|
xinput_state({0}),
|
||||||
xinput_api(nullptr)
|
xinput_api(nullptr)
|
||||||
{
|
{
|
||||||
|
@ -205,7 +205,6 @@ private:
|
|||||||
std::thread m_audioThread;
|
std::thread m_audioThread;
|
||||||
std::queue<xaudio2_buffer> m_queue;
|
std::queue<xaudio2_buffer> m_queue;
|
||||||
std::unique_ptr<bufferpool> m_buffer_pool;
|
std::unique_ptr<bufferpool> m_buffer_pool;
|
||||||
HMODULE m_xaudio2_module;
|
|
||||||
UINT32 m_overflows;
|
UINT32 m_overflows;
|
||||||
UINT32 m_underflows;
|
UINT32 m_underflows;
|
||||||
BOOL m_in_underflow;
|
BOOL m_in_underflow;
|
||||||
@ -227,7 +226,6 @@ public:
|
|||||||
m_hEventDataAvailable(nullptr),
|
m_hEventDataAvailable(nullptr),
|
||||||
m_hEventExiting(nullptr),
|
m_hEventExiting(nullptr),
|
||||||
m_buffer_pool(nullptr),
|
m_buffer_pool(nullptr),
|
||||||
m_xaudio2_module(nullptr),
|
|
||||||
m_overflows(0),
|
m_overflows(0),
|
||||||
m_underflows(0),
|
m_underflows(0),
|
||||||
m_in_underflow(FALSE),
|
m_in_underflow(FALSE),
|
||||||
|
Loading…
Reference in New Issue
Block a user