/[pkgs]/devel/BlockOutII/BlockOutII-2.3-restore-resolution.patch
ViewVC logotype

Contents of /devel/BlockOutII/BlockOutII-2.3-restore-resolution.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download) (as text)
Fri Nov 30 20:24:41 2007 UTC (23 months, 3 weeks ago) by jwrdegoede
Branch: MAIN
CVS Tags: F-12-split, BlockOutII-2_3-4_fc9, F-10-split, F-11-split, BlockOutII-2_3-6_fc11, BlockOutII-2_3-5_fc9, BlockOutII-2_3-7_fc12, F-9-split, BlockOutII-2_3-3_fc9, HEAD
File MIME type: text/x-patch
initial BlockOutII import
1 diff -up BlockOutII-2.3/BlockOut_GL/GLApp/GLApp.cpp.fs BlockOutII-2.3/BlockOut_GL/GLApp/GLApp.cpp
2 --- BlockOutII-2.3/BlockOut_GL/GLApp/GLApp.cpp.fs 2007-08-02 15:44:10.000000000 +0200
3 +++ BlockOutII-2.3/BlockOut_GL/GLApp/GLApp.cpp 2007-11-30 20:46:53.000000000 +0100
4 @@ -20,30 +20,8 @@ GLApplication::GLApplication() {
5
6 int GLApplication::ToggleFullscreen() {
7
8 - int errCode;
9 -
10 - InvalidateDeviceObjects();
11 -
12 - m_bWindowed = !m_bWindowed;
13 -
14 - Uint32 flags;
15 - if( m_bWindowed ) flags = SDL_OPENGL;
16 - else flags = SDL_OPENGL | SDL_FULLSCREEN;
17 -
18 - if( SDL_SetVideoMode( m_screenWidth, m_screenHeight, 0, flags ) == NULL )
19 - {
20 - printf("SDL_SetVideoMode() failed.\n");
21 - return GL_FAIL;
22 - }
23 -
24 - SDL_Surface *vSurf = SDL_GetVideoSurface();
25 - m_bitsPerPixel = vSurf->format->BitsPerPixel;
26 -
27 - errCode = RestoreDeviceObjects();
28 - if( !errCode ) {
29 - printGlError();
30 - exit(1);
31 - }
32 + if (SDL_WM_ToggleFullScreen(SDL_GetVideoSurface()))
33 + m_bWindowed = !m_bWindowed;
34
35 return GL_OK;
36
37 @@ -69,6 +47,8 @@ int GLApplication::Create(int width, int
38 printf("SDL_Init() failed : %s\n" , SDL_GetError() );
39 return GL_FAIL;
40 }
41 +
42 + atexit(SDL_Quit);
43
44 //SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 0);
45 SDL_EnableUNICODE( 1 );
46 diff -up BlockOutII-2.3/BlockOut_GL/BlockOut.cpp.fs BlockOutII-2.3/BlockOut_GL/BlockOut.cpp
47 --- BlockOutII-2.3/BlockOut_GL/BlockOut.cpp.fs 2007-08-02 15:44:09.000000000 +0200
48 +++ BlockOutII-2.3/BlockOut_GL/BlockOut.cpp 2007-11-30 20:44:24.000000000 +0100
49 @@ -120,7 +120,7 @@ int BlockOut::FrameMove()
50 break;
51 case 100: // Exit
52 InvalidateDeviceObjects();
53 - _exit(0);
54 + exit(0);
55 break;
56 }
57 break;

admin@fedoraproject.org
ViewVC Help
Powered by ViewVC 1.1.2