mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
nakee's work on dolphin events. Also get wxw out of logmanager. This commit wants your comments
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1875 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -8,9 +8,9 @@
|
||||
#include "Config.h"
|
||||
#include "pluginspecs_video.h"
|
||||
|
||||
#include <GL/glew.h>
|
||||
#include <GLew/glew.h>
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#if defined(__APPLE__)
|
||||
#include <OpenGL/gl.h>
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
@ -38,16 +38,17 @@ class GLWindow {
|
||||
|
||||
protected:
|
||||
|
||||
res origRes, currFullRes, currWinRes;
|
||||
EventHandler* eventHandler;
|
||||
res origRes, currFullRes, currWinRes;
|
||||
std::vector<res> fullResolutions;
|
||||
std::vector<res> winResolutions;
|
||||
virtual void SetRender(u32 x, u32 y) {
|
||||
xRender = x;
|
||||
yRender = y;
|
||||
}
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
||||
virtual void SwapBuffers() {};
|
||||
virtual void SetWindowText(const char *text) {};
|
||||
virtual bool PeekMessages() {return false;};
|
||||
@ -55,15 +56,15 @@ public:
|
||||
virtual bool MakeCurrent() {return false;};
|
||||
|
||||
virtual void updateDim() {
|
||||
if (GetProperty(OGL_FULLSCREEN))
|
||||
if (GetProperty(OGL_FULLSCREEN))
|
||||
SetWinSize(currFullRes.x, currFullRes.y);
|
||||
else
|
||||
SetWinSize(currWinRes.x, currWinRes.y);
|
||||
|
||||
|
||||
float FactorX = 640.0f / (float)GetXwin();
|
||||
float FactorY = 480.0f / (float)GetYwin();
|
||||
float Max = (FactorX < FactorY) ? FactorX : FactorY;
|
||||
|
||||
|
||||
if(GetProperty(OGL_STRETCHTOFIT)) {
|
||||
SetMax(1.0f / FactorX, 1.0f / FactorY);
|
||||
SetOffset(0,0);
|
||||
@ -74,8 +75,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
bool GetProperty(OGL_Props prop) {return properties[prop];}
|
||||
virtual bool SetProperty(OGL_Props prop, bool value)
|
||||
void SetEventHandler(EventHandler *eh) { eventHandler = eh;}
|
||||
bool GetProperty(OGL_Props prop) {return properties[prop];}
|
||||
virtual bool SetProperty(OGL_Props prop, bool value)
|
||||
{return properties[prop] = value;}
|
||||
|
||||
u32 GetXrender() {return xRender;}
|
||||
@ -84,8 +86,8 @@ public:
|
||||
u32 GetXwin() {return xWin;}
|
||||
u32 GetYwin() {return yWin;}
|
||||
void SetWinSize(u32 x, u32 y) {
|
||||
xWin = x;
|
||||
yWin = y;
|
||||
xWin = x;
|
||||
yWin = y;
|
||||
}
|
||||
|
||||
int GetYoff() {return yOffset;}
|
||||
@ -102,16 +104,16 @@ public:
|
||||
|
||||
float GetXmax() {return xMax;}
|
||||
float GetYmax() {return yMax;}
|
||||
|
||||
|
||||
static bool valid() { return false;}
|
||||
|
||||
GLWindow() {
|
||||
|
||||
|
||||
// Load defaults
|
||||
sscanf(g_Config.iFSResolution, "%dx%d",
|
||||
sscanf(g_Config.iFSResolution, "%dx%d",
|
||||
&currFullRes.x, &currFullRes.y);
|
||||
|
||||
sscanf(g_Config.iWindowedRes, "%dx%d",
|
||||
|
||||
sscanf(g_Config.iWindowedRes, "%dx%d",
|
||||
&currWinRes.x, &currWinRes.y);
|
||||
|
||||
SetProperty(OGL_FULLSCREEN, g_Config.bFullscreen);
|
||||
|
Reference in New Issue
Block a user