GRIM: Remove unused return value from GfxBase::setupScreen

This commit is contained in:
Pawel Kolodziejski 2020-10-05 20:03:16 +02:00
parent c4b9f966b6
commit b8ae32d71b
7 changed files with 7 additions and 13 deletions

View file

@ -79,7 +79,7 @@ public:
* @param screenH the height of the context * @param screenH the height of the context
* @param fullscreen true if fullscreen is desired, false otherwise. * @param fullscreen true if fullscreen is desired, false otherwise.
*/ */
virtual byte *setupScreen(int screenW, int screenH, bool fullscreen) = 0; virtual void setupScreen(int screenW, int screenH, bool fullscreen) = 0;
/** /**
* Query whether the current context is hardware-accelerated * Query whether the current context is hardware-accelerated

View file

@ -129,7 +129,7 @@ GfxOpenGL::~GfxOpenGL() {
} }
} }
byte *GfxOpenGL::setupScreen(int screenW, int screenH, bool fullscreen) { void GfxOpenGL::setupScreen(int screenW, int screenH, bool fullscreen) {
_screenWidth = screenW; _screenWidth = screenW;
_screenHeight = screenH; _screenHeight = screenH;
_scaleW = _screenWidth / (float)_gameWidth; _scaleW = _screenWidth / (float)_gameWidth;
@ -159,8 +159,6 @@ byte *GfxOpenGL::setupScreen(int screenW, int screenH, bool fullscreen) {
initExtensions(); initExtensions();
glGetIntegerv(GL_MAX_LIGHTS, &_maxLights); glGetIntegerv(GL_MAX_LIGHTS, &_maxLights);
return nullptr;
} }
void GfxOpenGL::initExtensions() { void GfxOpenGL::initExtensions() {

View file

@ -47,7 +47,7 @@ public:
GfxOpenGL(); GfxOpenGL();
virtual ~GfxOpenGL(); virtual ~GfxOpenGL();
byte *setupScreen(int screenW, int screenH, bool fullscreen) override; void setupScreen(int screenW, int screenH, bool fullscreen) override;
const char *getVideoDeviceName() override; const char *getVideoDeviceName() override;

View file

@ -406,7 +406,7 @@ void GfxOpenGLS::setupShaders() {
} }
} }
byte *GfxOpenGLS::setupScreen(int screenW, int screenH, bool fullscreen) { void GfxOpenGLS::setupScreen(int screenW, int screenH, bool fullscreen) {
_screenWidth = screenW; _screenWidth = screenW;
_screenHeight = screenH; _screenHeight = screenH;
_scaleW = _screenWidth / (float)_gameWidth; _scaleW = _screenWidth / (float)_gameWidth;
@ -430,7 +430,6 @@ byte *GfxOpenGLS::setupScreen(int screenW, int screenH, bool fullscreen) {
// color map and the following are using textures. // color map and the following are using textures.
glDepthFunc(GL_LEQUAL); glDepthFunc(GL_LEQUAL);
} }
return NULL;
} }
void GfxOpenGLS::setupCameraFrustum(float fov, float nclip, float fclip) { void GfxOpenGLS::setupCameraFrustum(float fov, float nclip, float fclip) {

View file

@ -43,7 +43,7 @@ public:
* @param screenH the height of the context * @param screenH the height of the context
* @param fullscreen true if fullscreen is desired, false otherwise. * @param fullscreen true if fullscreen is desired, false otherwise.
*/ */
virtual byte *setupScreen(int screenW, int screenH, bool fullscreen) override; virtual void setupScreen(int screenW, int screenH, bool fullscreen) override;
/** /**
* Query whether the current context is hardware-accelerated * Query whether the current context is hardware-accelerated

View file

@ -77,9 +77,8 @@ GfxTinyGL::~GfxTinyGL() {
} }
} }
byte *GfxTinyGL::setupScreen(int screenW, int screenH, bool fullscreen) { void GfxTinyGL::setupScreen(int screenW, int screenH, bool fullscreen) {
Graphics::PixelBuffer buf = g_system->getScreenPixelBuffer(); Graphics::PixelBuffer buf = g_system->getScreenPixelBuffer();
byte *buffer = buf.getRawBuffer();
_screenWidth = screenW; _screenWidth = screenW;
_screenHeight = screenH; _screenHeight = screenH;
@ -103,8 +102,6 @@ byte *GfxTinyGL::setupScreen(int screenW, int screenH, bool fullscreen) {
tglLightModelfv(TGL_LIGHT_MODEL_AMBIENT, ambientSource); tglLightModelfv(TGL_LIGHT_MODEL_AMBIENT, ambientSource);
TGLfloat diffuseReflectance[] = { 1.0f, 1.0f, 1.0f, 1.0f }; TGLfloat diffuseReflectance[] = { 1.0f, 1.0f, 1.0f, 1.0f };
tglMaterialfv(TGL_FRONT, TGL_DIFFUSE, diffuseReflectance); tglMaterialfv(TGL_FRONT, TGL_DIFFUSE, diffuseReflectance);
return buffer;
} }
const char *GfxTinyGL::getVideoDeviceName() { const char *GfxTinyGL::getVideoDeviceName() {

View file

@ -39,7 +39,7 @@ public:
GfxTinyGL(); GfxTinyGL();
virtual ~GfxTinyGL(); virtual ~GfxTinyGL();
byte *setupScreen(int screenW, int screenH, bool fullscreen) override; void setupScreen(int screenW, int screenH, bool fullscreen) override;
const char *getVideoDeviceName() override; const char *getVideoDeviceName() override;