~ubuntu-branches/ubuntu/trusty/enigma/trusty-proposed

« back to all changes in this revision

Viewing changes to src/video.cc

  • Committer: Package Import Robot
  • Author(s): Erich Schubert
  • Date: 2013-04-06 14:54:02 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20130406145402-jgjrtk7hac8gtvza
Tags: 1.20-dfsg.1-1
* New upstream release (Closes: #704595)
  (Repacked: dropped zipios++ source and main menu music)
* Update watch file, sf.net again.
* Fix documentation links (Closes: #653508)
* Conflict with enigma-level-previews to encourage deinstallation
  (Pregenerated level previews were only used with version 1.01)
* Use dh7 for building instead of CDBS
* Update to policy 3.9.4.0 (no changes)
* Register documentation with doc-base

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
#include "options.hh"
37
37
#include "main.hh"
38
38
#include "ecl.hh"
39
 
#include "SDL.h"
40
39
#include <cassert>
41
40
#include <cstdio>
42
41
#include <fstream>
131
130
 
132
131
bool Video_SDL::init(int w, int h, int bpp, bool fullscreen)
133
132
{
 
133
#ifndef MACOSX
134
134
    static bool firstInit = true;
135
 
    
136
 
#ifndef MACOSX
137
135
    if (firstInit) {
138
136
        // Set the caption icon -- due to SDL doc it has to be set before first SDL_SetVideoMode() !!
139
137
        // In praxis this SetIcon does not work for Linux, nor is it necessary for OSX.
761
759
    }
762
760
    vidmode = video::GetBestUserMode(isFullScreen);
763
761
    
764
 
    int oldvidmode = vidmode;
765
 
 
766
762
    video_engine = new Video_SDL();
767
763
 
768
 
 
769
764
    assert(bpp==16 || bpp==32);
770
765
    int fallback_sequence = 1;
771
766
    while (true) {
885
880
    float gamma = static_cast<float> (app.prefs->getDouble ("Gamma"));
886
881
    if (gamma < 0.25)  
887
882
        gamma = 0.25;  // Windows does not set gamma for values < 0.2271
888
 
    int result = SDL_SetGamma (gamma, gamma, gamma);
 
883
    SDL_SetGamma (gamma, gamma, gamma);
889
884
}
890
885
 
891
886
void video::Screenshot (const std::string &fname) 
897
892
    }
898
893
 
899
894
    ecl::SavePNG (ecl::Grab(SCREEN->get_surface(), video_modes[current_video_mode].area), fname);
900
 
    enigma::Log << "Wrote screenshot to '" << fname << "\n";
 
895
    enigma::Log << "Wrote screenshot to '" << fname << "'\n";
901
896
}
902
897
 
903
898
/* -------------------- Special Effects -------------------- */