dolphin/Source/Core/InputCommon/GenericMouse.h
2021-03-27 14:37:45 -04:00

33 lines
561 B
C++

#pragma once
#include <stdint.h>
extern int win_x;
extern int win_y;
extern int win_w, win_h;
extern void* win_hdl;
namespace prime
{
class GenericMouse
{
public:
// Platform dependant implementations are made virtual
virtual void UpdateInput() = 0;
virtual void LockCursorToGameWindow() = 0;
void mousePressEvent(int x, int y);
void ResetDeltas();
int32_t GetDeltaVerticalAxis() const;
int32_t GetDeltaHorizontalAxis() const;
protected:
bool cursor_locked;
int32_t dx, dy;
};
extern GenericMouse* g_mouse_input;
} // namespace prime