Ignore:
Timestamp:
May 21, 2009, 10:55:07 PM (12 years ago)
Author:
Sam Hocevar
Message:

Fix the old demo examples so that they don't refresh the screen twice
every frame, causing the mouse to flicker.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/examples/demo.c

    r3465 r3493  
    11/*
    22 *  demo          demo for libcaca
    3  *  Copyright (c) 2003 Sam Hocevar <sam@zoy.org>
     3 *  Copyright (c) 2003-2009 Sam Hocevar <sam@hocevar.net>
    44 *                All Rights Reserved
    55 *
     
    111111                    outline = (outline + 1) % 3;
    112112                    display_menu();
     113                    caca_refresh_display(dp);
    113114                    break;
    114115                case 'b':
     
    116117                    bounds = (bounds + 1) % 2;
    117118                    display_menu();
     119                    caca_refresh_display(dp);
    118120                    break;
    119121#if 0
     
    123125                    caca_set_feature(cv, dithering);
    124126                    display_menu();
     127                    caca_refresh_display(dp);
    125128                    break;
    126129#endif
     
    187190            mouse = menu = 0;
    188191        }
    189 
    190         if(demo)
     192        else if(demo)
    191193        {
    192194            demo();
     
    248250    caca_put_str(cv, 4, yo - 2, "'q': quit");
    249251
    250     caca_refresh_display(dp);
     252    //caca_refresh_display(dp);
    251253}
    252254
Note: See TracChangeset for help on using the changeset viewer.