Video: we don't need to record the refresh rate anymore
Once we get OpenGL rendering all set up, double buffering will limit the frame rate for us.
This commit is contained in:
parent
b7a717ff70
commit
cbf34d2db3
2 changed files with 0 additions and 14 deletions
|
@ -72,7 +72,6 @@ CVideo::CVideo(FAKE_TYPES type)
|
|||
, help_string_(0)
|
||||
, updated_locked_(0)
|
||||
, flip_locked_(0)
|
||||
, refresh_rate_(0)
|
||||
{
|
||||
assert(!singleton_);
|
||||
singleton_ = this;
|
||||
|
@ -147,7 +146,6 @@ void CVideo::blit_surface(int x, int y, surface surf, SDL_Rect* srcrect, SDL_Rec
|
|||
void CVideo::make_fake()
|
||||
{
|
||||
fake_screen_ = true;
|
||||
refresh_rate_ = 1;
|
||||
|
||||
image::set_pixel_format(frameBuffer->format);
|
||||
}
|
||||
|
@ -155,10 +153,8 @@ void CVideo::make_fake()
|
|||
void CVideo::make_test_fake()
|
||||
{
|
||||
fake_interactive = true;
|
||||
refresh_rate_ = 1;
|
||||
}
|
||||
|
||||
|
||||
void CVideo::init_window()
|
||||
{
|
||||
// Position
|
||||
|
@ -191,10 +187,6 @@ void CVideo::init_window()
|
|||
|
||||
window->set_minimum_size(preferences::min_window_width, preferences::min_window_height);
|
||||
|
||||
SDL_DisplayMode currentDisplayMode;
|
||||
SDL_GetCurrentDisplayMode(window->get_display_index(), ¤tDisplayMode);
|
||||
refresh_rate_ = currentDisplayMode.refresh_rate != 0 ? currentDisplayMode.refresh_rate : 60;
|
||||
|
||||
#ifdef USE_GL_RENDERING
|
||||
// Initialize an OpenGL context for the window.
|
||||
gl_context.reset(new gl::context(window.get()));
|
||||
|
|
|
@ -148,11 +148,6 @@ public:
|
|||
*/
|
||||
void set_window_icon(surface& icon);
|
||||
|
||||
int current_refresh_rate() const
|
||||
{
|
||||
return refresh_rate_;
|
||||
}
|
||||
|
||||
/***** ***** ***** ***** Drawing functions ***** ***** ****** *****/
|
||||
|
||||
/**
|
||||
|
@ -281,7 +276,6 @@ private:
|
|||
|
||||
int updated_locked_;
|
||||
int flip_locked_;
|
||||
int refresh_rate_;
|
||||
};
|
||||
|
||||
/** An object which will lock the display for the duration of its lifetime. */
|
||||
|
|
Loading…
Add table
Reference in a new issue