Changeset f51359c in buchla-emu for emu/vid.c


Ignore:
Timestamp:
09/05/2017 09:49:45 AM (7 years ago)
Author:
Alexander Heinrich <alex.heinrich@…>
Branches:
master
Children:
c8a92ef
Parents:
5475ecf (diff), ca77925 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of ssh://bob.lopatic.de:11501/home/git/buchla-emu into lcda

File:
1 edited

Legend:

Unmodified
Added
Removed
  • emu/vid.c

    r5475ecf rf51359c  
    5050#define OD0_CB 0x0800
    5151
     52#define AT_UND 0x0100
    5253#define AT_CG 0x8000
    5354
     
    8081
    8182static SDL_Window *win;
     83uint32_t vid_win;
     84
    8285static SDL_Renderer *ren;
    8386static SDL_Texture *tex;
     
    123126                                int32_t fg = (at & 0x00f0) >> 4;
    124127
    125                                 uint16_t *cg = (at & AT_CG) != 0 ? cg0 : cg1;
    126                                 int32_t bits = cg[256 * line + ch];
     128                                int32_t bits;
     129
     130                                if ((at & AT_UND) != 0 && line == 1) {
     131                                        bits = 0xff;
     132                                }
     133                                else {
     134                                        uint16_t *cg = (at & AT_CG) != 0 ? cg0 : cg1;
     135                                        bits = cg[256 * line + ch];
     136                                }
     137
    127138                                int32_t mask = 0x01;
    128139
     
    225236        if (win == NULL) {
    226237                fail("SDL_CreateWindow() failed: %s", SDL_GetError());
     238        }
     239
     240        vid_win = SDL_GetWindowID(win);
     241
     242        if (vid_win == 0) {
     243                fail("SDL_GetWindowID() failed: %s", SDL_GetError());
    227244        }
    228245
Note: See TracChangeset for help on using the changeset viewer.