- Timestamp:
- 09/05/2017 09:49:45 AM (7 years ago)
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
emu/sdl.c
r5475ecf rf51359c 67 67 68 68 bool rel_mod = false; 69 uint32_t win = 0; 69 70 70 71 while (SDL_AtomicGet(&run) != 0) { … … 101 102 SDL_AtomicSet(&run, 0); 102 103 continue; 104 } 105 106 if (ev.type == SDL_WINDOWEVENT) { 107 if (ev.window.event == SDL_WINDOWEVENT_FOCUS_GAINED) { 108 ver("sdl ev win %u", ev.window.windowID); 109 win = ev.window.windowID; 110 } 103 111 } 104 112 … … 138 146 if (ev.type == SDL_TEXTINPUT) { 139 147 ver("sdl ev text input %d", ev.text.text[0]); 140 ser_text(&ev.text); 148 149 if (win == ser_win) { 150 ser_text(&ev.text); 151 } 152 141 153 continue; 142 154 } … … 144 156 if (ev.type == SDL_KEYDOWN) { 145 157 ver("sdl ev key down %d", (int32_t)ev.key.keysym.sym); 146 ser_key(&ev.key); 158 159 if (win == ser_win) { 160 ser_key(&ev.key); 161 } 162 else if (win == vid_win) { 163 kbd_key(&ev.key, true); 164 } 165 166 continue; 167 } 168 169 if (ev.type == SDL_KEYUP) { 170 ver("sdl ev key up %d", (int32_t)ev.key.keysym.sym); 171 172 if (win == vid_win) { 173 kbd_key(&ev.key, false); 174 } 175 147 176 continue; 148 177 }
Note:
See TracChangeset
for help on using the changeset viewer.