Show
Ignore:
Timestamp:
08/26/10 18:56:28 (21 months ago)
Author:
Carsten
Message:

Clean-up of code and comments.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • cafu/branches/cafu_to_wx/Ca3DE/ConDefs.cpp

    r132 r133  
    212212 
    213213 
    214 static int ConFunc_VideoGetModes_Callback(lua_State* LuaState) 
    215 { 
    216     wxDisplay         Display; 
    217     wxArrayVideoModes Modes         =Display.GetModes(); 
    218     const wxVideoMode CurrentMode   =Display.GetCurrentMode(); 
    219     bool              Have32BPPModes=false; 
    220  
    221     for (size_t ModeNr=0; ModeNr<Modes.GetCount(); ModeNr++) 
    222     { 
    223         const wxVideoMode& Mode=Modes[ModeNr]; 
    224  
    225         if (Mode.bpp>=32) 
    226         { 
    227             Have32BPPModes=true; 
    228             break; 
    229         } 
    230     } 
    231  
    232     for (size_t ModeNr=0; ModeNr<Modes.GetCount(); ModeNr++) 
    233     { 
    234         const wxVideoMode& Mode     =Modes[ModeNr]; 
    235         const bool         IsCurrent=(Mode==CurrentMode); 
    236  
    237         if (Have32BPPModes && Mode.bpp<32 && !IsCurrent) continue; 
    238  
    239         Console->Print(cf::va("%3u,    %i x %i, %i BPP @ %i Hz%s\n", ModeNr, Mode.w, Mode.h, Mode.bpp, Mode.refresh, IsCurrent ? " (current)" : "")); 
    240     } 
    241  
     214static int ConFunc_VideoInfo_Callback(lua_State* LuaState) 
     215{ 
     216    Console->Print(GetVideoModes()); 
    242217    Console->Print(cf::va("Renderer Info: %s\n", MatSys::Renderer ? MatSys::Renderer->GetDescription() : "[No renderer active.]")); 
    243218    return 0; 
    244219} 
    245220 
    246 static ConFuncT ConFunc_VideoGetModes("VideoGetModes", ConFunc_VideoGetModes_Callback, ConFuncT::FLAG_MAIN_EXE, "Prints some information about the OpenGL window and renderer."); 
     221static ConFuncT ConFunc_VideoInfo("VideoInfo", ConFunc_VideoInfo_Callback, ConFuncT::FLAG_MAIN_EXE, "Prints some information about the OpenGL window and renderer."); 
    247222 
    248223