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:
Shawn Hoffman
2009-01-15 06:48:15 +00:00
parent aced3c00fd
commit ba8c2aa7e4
83 changed files with 1293 additions and 1657 deletions

View File

@ -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);