comparison menu.c @ 954:cbc5b39e5518

Implement "Resume" button in pause menu
author Michael Pavone <pavone@retrodev.com>
date Tue, 12 Apr 2016 22:50:31 -0700
parents 5e4fb650de58
children 1618d3676a35
comparison
equal deleted inserted replaced
953:08346262990b 954:cbc5b39e5518
189 char const *pieces[] = {menu->curpath, "/", buf}; 189 char const *pieces[] = {menu->curpath, "/", buf};
190 gen->next_rom = alloc_concat_m(3, pieces); 190 gen->next_rom = alloc_concat_m(3, pieces);
191 m68k->should_return = 1; 191 m68k->should_return = 1;
192 break; 192 break;
193 case 3: { 193 case 3: {
194 m68k->should_return = 1; 194 switch (dst)
195 gen->should_exit = 1; 195 {
196 case 1:
197 m68k->should_return = 1;
198 gen->should_exit = 1;
199 break;
200 case 2:
201 m68k->should_return = 1;
202 break;
203 }
204
196 break; 205 break;
197 } 206 }
198 } 207 }
199 default: 208 default:
200 fprintf(stderr, "WARNING: write to undefined menu port %X\n", address); 209 fprintf(stderr, "WARNING: write to undefined menu port %X\n", address);
202 menu->state = 0; 211 menu->state = 0;
203 } else { 212 } else {
204 menu->latch = value; 213 menu->latch = value;
205 menu->state = 1; 214 menu->state = 1;
206 } 215 }
216 if (m68k->should_return) {
217 m68k->target_cycle = m68k->current_cycle;
218 }
207 219
208 return context; 220 return context;
209 } 221 }