mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
More WIP OGL EventHandler work by shuffle2 and myself. Wiimote isn't implemented yet and OGL window is too small (should take window borders into account when creating window).
Not committing VideoOGL.vcproj so that project compiles with old OGL video window. In order to test just replace main.cpp/GLUtil.cpp/GLUtil.h with nmain.cpp/nGLUtil.cpp/nGLUtil.h in the project. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2038 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -6,24 +6,65 @@
|
||||
#ifdef _WIN32
|
||||
class Win32Window : public GLWindow
|
||||
{
|
||||
virtual void SwapBuffers();
|
||||
virtual void SetWindowText(const char *text);
|
||||
virtual bool PeekMessages();
|
||||
virtual void Update();
|
||||
virtual bool MakeCurrent();
|
||||
|
||||
static bool valid() { return true; }
|
||||
~Win32Window();
|
||||
Win32Window();
|
||||
static sf::Key::Code KeysymToSF(KeySym Sym);
|
||||
public:
|
||||
virtual void SwapBuffers();
|
||||
virtual void SetWindowText(const char *text);
|
||||
virtual bool PeekMessages();
|
||||
virtual void Update();
|
||||
virtual bool MakeCurrent();
|
||||
HWND GetWnd(){return myHandle;};
|
||||
HWND GetParentWnd(){return myParent;};
|
||||
|
||||
static bool valid() { return true; }
|
||||
~Win32Window();
|
||||
Win32Window();
|
||||
static sf::Key::Code VirtualKeyCodeToSF(WPARAM VirtualKey, LPARAM Flags);
|
||||
static sf::Key::Code GetShiftState(bool KeyDown);
|
||||
|
||||
private:
|
||||
struct VideoMode
|
||||
{
|
||||
unsigned int Width;
|
||||
unsigned int Height;
|
||||
unsigned int BitsPerPixel;
|
||||
unsigned int DepthBits;
|
||||
unsigned int StencilBits;
|
||||
unsigned int AntialiasingLevel;
|
||||
};
|
||||
|
||||
virtual void ShowMouseCursor(bool Show);
|
||||
void RegisterWindowClass();
|
||||
void SwitchToFullscreen(const VideoMode& Mode);
|
||||
void CreateContext(VideoMode& Mode);
|
||||
void Cleanup();
|
||||
void ProcessEvent(UINT Message, WPARAM WParam, LPARAM LParam);
|
||||
static LRESULT CALLBACK GlobalOnEvent(HWND Handle, UINT Message, WPARAM WParam, LPARAM LParam);
|
||||
|
||||
// Static member data
|
||||
static unsigned int ourWindowCount;
|
||||
static const char* ourClassName;
|
||||
static Win32Window* ourFullscreenWindow;
|
||||
|
||||
// Member data
|
||||
HWND myHandle;
|
||||
HINSTANCE myhInstance;
|
||||
HWND myParent; // Possibly not wanted here
|
||||
long myCallback;
|
||||
HCURSOR myCursor;
|
||||
HICON myIcon;
|
||||
bool myKeyRepeatEnabled;
|
||||
bool myIsCursorIn;
|
||||
HDC myDeviceContext;
|
||||
HGLRC myGLContext;
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
class Win32Window : public GLWindow
|
||||
{
|
||||
public:
|
||||
Win32Window {}
|
||||
public:
|
||||
Win32Window {}
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif //_WIN32
|
||||
#endif //_WIN32WINDOW_H
|
||||
|
Reference in New Issue
Block a user