Changeset 3939


Ignore:
Timestamp:
Nov 18, 2009, 3:40:39 PM (11 years ago)
Author:
Jean-Yves Lamoureux
Message:
  • Remove unused variables in screen_list, add configuration line to control cube switch duration
Location:
neercs/trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • neercs/trunk/src/configuration.c

    r3914 r3939  
    294294            else fprintf(stderr, "Unknown window manager '%s'\n", option->key);
    295295
     296        } else if(IS_TOKEN("cube_duration"))
     297        {
     298           screen_list->cube.duration = atoi(option->value) * 1000000;
    296299        } else if(IS_TOKEN("thumbnails"))
    297300        {
    298301            if     (IS_VALUE("true") || IS_VALUE("1")) screen_list->mini = 1;
    299302            else                                       screen_list->mini = 0;
    300 
     303           
    301304        } else if(IS_TOKEN("status_bar"))
    302305        {
  • neercs/trunk/src/main.c

    r3923 r3939  
    404404    screen_list->force_refresh = 0;
    405405    screen_list->cube.in_switch = 0;
    406     screen_list->cube.first=0;
    407     screen_list->cube.second=0;
     406    screen_list->cube.duration = 1000000;
    408407
    409408
  • neercs/trunk/src/neercs.h

    r3914 r3939  
    151151    int in_switch;
    152152        int side;
    153     int first, second;
     153    long long unsigned int duration;
    154154};
    155155
  • neercs/trunk/src/neercsrc

    r3914 r3939  
    1010
    1111[windows]
    12 window_manager = cube   ; full card  hsplit vsplit cube
     12window_manager = cube     ; full card  hsplit vsplit cube
     13cube_duration  = 1        ; Cube duration in seconds
    1314status_bar = true         ; Activate status bar
    1415autolock_timeout = 120    ; Lock session after 100 seconds
    1516
    1617[eyecandy]                ; Not-that-useful stuff
    17 thumbnails = false         ; Activate thumbnails
     18thumbnails = false        ; Activate thumbnails
    1819screensaver_timeout = 60  ; Screen Saver timeout in seconds, 0 to desactivate
  • neercs/trunk/src/wm.c

    r3938 r3939  
    354354        caca_fill_triangle_textured(cv, coords, tex, uv);
    355355#endif
    356 
    357356        coords[0] = p1x;
    358357        coords[1] = p1y;
     
    378377}
    379378
    380 #define CUBE_TIME 1000000
     379
    381380void wm_refresh_cube(struct screen_list *screen_list)
    382381{
     
    392391        long long unsigned int cur_time = get_us() - screen_list->last_switch;
    393392
    394         if (cur_time >= CUBE_TIME || screen_list->count == 1)
     393        if (cur_time >= screen_list->cube.duration || screen_list->count == 1)
    395394        {
    396395            screen_list->changed = 1;
     
    420419            float cube_projected[12][2];
    421420            float fov = 0.5f;
    422             float angle = 90.0f * ((float)cur_time / (float)CUBE_TIME);
     421            float angle = 90.0f * ((float)cur_time / (float)screen_list->cube.duration);
    423422
    424423            angle *= (M_PI / 180.0f);
Note: See TracChangeset for help on using the changeset viewer.