Changeset 1999


Ignore:
Timestamp:
Oct 9, 2012, 2:26:48 PM (5 years ago)
Author:
sam
Message:

neercs: don't show the FPS information unless the setup is open.

Location:
trunk/tools/neercs
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/neercs/neercs.cpp

    r1990 r1999  
    8181
    8282    new Neercs(argc, argv);
    83     new DebugFps(2, 2);
    8483    app.ShowPointer(false);
    8584
  • trunk/tools/neercs/video/render.cpp

    r1993 r1999  
    602602  : m_cv_screen(caca),
    603603    m_cv_setup(caca_create_canvas(1, 1)),
     604    m_fps_debug(0),
    604605    m_ready(false),
    605606    m_pause(false),
     
    736737        sync_flag = true;
    737738        sync_angle = main_angle;
     739
     740        if (m_fps_debug)
     741        {
     742            Ticker::Unref(m_fps_debug);
     743            m_fps_debug = NULL;
     744        }
     745
     746        if (g_setup)
     747        {
     748            m_fps_debug = new DebugFps(2, 2);
     749            Ticker::Ref(m_fps_debug);
     750        }
    738751    }
    739752    if (Input::WasPressed(Key::F2))
     
    13311344Render::~Render()
    13321345{
     1346    if (m_fps_debug)
     1347        Ticker::Unref(m_fps_debug);
    13331348}
     1349
  • trunk/tools/neercs/video/render.h

    r1977 r1999  
    3434    class TextRender *m_txt_screen, *m_txt_setup;
    3535
     36    Entity *m_fps_debug;
     37
    3638    bool m_ready;
    3739    bool m_pause;
Note: See TracChangeset for help on using the changeset viewer.