Changeset 1171


Ignore:
Timestamp:
Mar 26, 2012, 8:18:27 PM (8 years ago)
Author:
sam
Message:

sdl: on Windows, perform the input tick in the main drawing thread.

Location:
trunk/src/platform/sdl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/platform/sdl/sdlinput.cpp

    r1110 r1171  
    3232
    3333private:
     34    void Tick(float deltams);
     35
    3436    static ivec2 GetMousePos();
    3537};
     
    4446#if defined USE_SDL
    4547    SDL_Init(SDL_INIT_TIMER);
     48#endif
    4649
    4750    m_gamegroup = GAMEGROUP_BEFORE;
    48 #endif
    4951}
    5052
    5153void SdlInput::TickGame(float deltams)
    5254{
    53 #if defined USE_SDL
    5455    Entity::TickGame(deltams);
    5556
     57#if !defined _WIN32
     58    data->Tick(deltams);
     59#endif
     60}
     61
     62void SdlInput::TickDraw(float deltams)
     63{
     64    Entity::TickDraw(deltams);
     65
     66#if defined _WIN32
     67    data->Tick(deltams);
     68#endif
     69}
     70
     71void SdlInputData::Tick(float deltams)
     72{
     73#if defined USE_SDL
    5674    /* Handle mouse input */
    5775    ivec2 mouse = SdlInputData::GetMousePos();;
  • trunk/src/platform/sdl/sdlinput.h

    r865 r1171  
    3232protected:
    3333    virtual void TickGame(float deltams);
     34    virtual void TickDraw(float deltams);
    3435
    3536private:
Note: See TracChangeset for help on using the changeset viewer.