X11 fullscreen fix

This commit is contained in:
James Turk 2005-08-10 05:36:58 +00:00
parent 8cbebab31e
commit abc2c2bad5
2 changed files with 47 additions and 44 deletions

View File

@ -1,40 +1,40 @@
#ifndef PHOTON_HPP
#define PHOTON_HPP
#include "Application.hpp"
#include "entrypoint.hpp"
#include "exceptions.hpp"
#include "InputListener.hpp"
#include "Kernel.hpp"
#include "Log.hpp"
#include "LogSink.hpp"
#include "photon.hpp"
#include "ResourceManaged.hpp"
#include "ResourceManager.hpp"
#include "State.hpp"
#include "Task.hpp"
#include "types.hpp"
#include "audio/AudioCore.hpp"
#include "audio/SampleResourceManager.hpp"
#include "audio/Source.hpp"
#include "math/Circle.hpp"
#include "math/math.hpp"
#include "math/Rect.hpp"
#include "math/Vector2.hpp"
#include "util/ConfigFile.hpp"
#include "util/FileBuffer.hpp"
#include "util/RandGen.hpp"
#include "util/Singleton.hpp"
#include "util/Timer.hpp"
#include "util/VersionInfo.hpp"
#include "util/filesys/filesys.hpp"
#include "video/Color.hpp"
#include "video/Font.hpp"
#include "video/FontResourceManager.hpp"
#include "video/Image.hpp"
#include "video/Pen.hpp"
#include "video/Texture.hpp"
#include "video/TextureResourceManager.hpp"
#include "video/VideoCore.hpp"
#endif // PHOTON_HPP
#ifndef PHOTON_HPP
#define PHOTON_HPP
#include "Kernel.hpp"
#include "types.hpp"
#include "State.hpp"
#include "Application.hpp"
#include "Task.hpp"
#include "exceptions.hpp"
#include "photon.hpp"
#include "InputListener.hpp"
#include "entrypoint.hpp"
#include "LogSink.hpp"
#include "Log.hpp"
#include "ResourceManaged.hpp"
#include "ResourceManager.hpp"
#include "audio/SampleResourceManager.hpp"
#include "audio/Source.hpp"
#include "audio/AudioCore.hpp"
#include "math/math.hpp"
#include "math/Rect.hpp"
#include "math/Vector2.hpp"
#include "math/Circle.hpp"
#include "util/ConfigFile.hpp"
#include "util/VersionInfo.hpp"
#include "util/Singleton.hpp"
#include "util/RandGen.hpp"
#include "util/Timer.hpp"
#include "util/FileBuffer.hpp"
#include "util/filesys/filesys.hpp"
#include "video/Pen.hpp"
#include "video/Image.hpp"
#include "video/FontResourceManager.hpp"
#include "video/Texture.hpp"
#include "video/Color.hpp"
#include "video/TextureResourceManager.hpp"
#include "video/VideoCore.hpp"
#include "video/Font.hpp"
#endif // PHOTON_HPP

View File

@ -5,7 +5,7 @@
// James Turk (jpt2433@rit.edu)
//
// Version:
// $Id: Application.cpp,v 1.20 2005/08/08 21:39:41 cozman Exp $
// $Id: Application.cpp,v 1.21 2005/08/10 05:36:58 cozman Exp $
#include "Application.hpp"
@ -22,7 +22,6 @@
#include "audio/AudioCore.hpp"
#include "util/filesys/filesys.hpp"
namespace photon
{
@ -82,13 +81,16 @@ void Application::createDisplay(uint width, uint height,
{
throw APIError("Failed to create display.");
}
displayWidth_ = width;
displayHeight_ = height;
// fetch window size (fixes X11 fullscreen bug)
glfwGetWindowSize(reinterpret_cast<int*>(&displayWidth_),
reinterpret_cast<int*>(&displayHeight_));
glfwSetWindowTitle(title.c_str()); // title is set separately
initOpenGL();
setOrthoView();
Kernel::getInstance().addTask(TaskPtr(new VideoTask()));
// register the callbacks (after a window is open)
@ -127,6 +129,7 @@ void Application::createDisplay(uint width, uint height, uint bpp,
"8,16,24, or 32, passed " +
boost::lexical_cast<std::string>(bpp) );
}
}
void Application::setTitle(const std::string& title)