@@ -214,15 +214,15 @@ consolewin_info::consolewin_info(debugger_windows_interface &debugger) :
214
214
m_current_cpu (nullptr ),
215
215
m_devices_menu (nullptr )
216
216
{
217
- if (!window () || !m_views[0 ])
217
+ if (!window () || !m_views[VIEW_IDX_DISASM ])
218
218
goto cleanup;
219
219
220
220
// create the views
221
- m_views[1 ].reset (new debugview_info (debugger, *this , window (), DVT_STATE));
222
- if (!m_views[1 ]->is_valid ())
221
+ m_views[VIEW_IDX_STATE ].reset (new debugview_info (debugger, *this , window (), DVT_STATE));
222
+ if (!m_views[VIEW_IDX_STATE ]->is_valid ())
223
223
goto cleanup;
224
- m_views[2 ].reset (new debugview_info (debugger, *this , window (), DVT_CONSOLE));
225
- if (!m_views[2 ]->is_valid ())
224
+ m_views[VIEW_IDX_CONSOLE ].reset (new debugview_info (debugger, *this , window (), DVT_CONSOLE));
225
+ if (!m_views[VIEW_IDX_CONSOLE ]->is_valid ())
226
226
goto cleanup;
227
227
228
228
{
@@ -257,12 +257,20 @@ consolewin_info::consolewin_info(debugger_windows_interface &debugger) :
257
257
258
258
// adjust the min/max sizes for the window style
259
259
bounds.top = bounds.left = 0 ;
260
- bounds.right = bounds.bottom = EDGE_WIDTH + m_views[1 ]->maxwidth () + (2 * EDGE_WIDTH) + 100 + EDGE_WIDTH;
260
+ bounds.right = bounds.bottom =
261
+ EDGE_WIDTH + m_views[VIEW_IDX_STATE]->maxwidth () +
262
+ (2 * EDGE_WIDTH) + 100 + EDGE_WIDTH;
261
263
AdjustWindowRectEx (&bounds, DEBUG_WINDOW_STYLE, FALSE , DEBUG_WINDOW_STYLE_EX);
262
264
set_minwidth (bounds.right - bounds.left );
263
265
264
266
bounds.top = bounds.left = 0 ;
265
- bounds.right = bounds.bottom = EDGE_WIDTH + m_views[1 ]->maxwidth () + (2 * EDGE_WIDTH) + std::max (m_views[0 ]->maxwidth (), m_views[2 ]->maxwidth ()) + EDGE_WIDTH;
267
+ bounds.right = bounds.bottom =
268
+ EDGE_WIDTH + m_views[VIEW_IDX_STATE]->maxwidth () +
269
+ (2 * EDGE_WIDTH) +
270
+ std::max (
271
+ m_views[VIEW_IDX_DISASM]->maxwidth (),
272
+ m_views[VIEW_IDX_CONSOLE]->maxwidth ()) +
273
+ EDGE_WIDTH;
266
274
AdjustWindowRectEx (&bounds, DEBUG_WINDOW_STYLE, FALSE , DEBUG_WINDOW_STYLE_EX);
267
275
set_maxwidth (bounds.right - bounds.left );
268
276
@@ -283,9 +291,9 @@ consolewin_info::consolewin_info(debugger_windows_interface &debugger) :
283
291
return ;
284
292
285
293
cleanup:
286
- m_views[2 ].reset ();
287
- m_views[1 ].reset ();
288
- m_views[0 ].reset ();
294
+ m_views[VIEW_IDX_CONSOLE ].reset ();
295
+ m_views[VIEW_IDX_STATE ].reset ();
296
+ m_views[VIEW_IDX_DISASM ].reset ();
289
297
}
290
298
291
299
@@ -301,8 +309,8 @@ void consolewin_info::set_cpu(device_t &device)
301
309
m_current_cpu = &device;
302
310
303
311
// first set all the views to the new cpu number
304
- m_views[0 ]->set_source_for_device (device);
305
- m_views[1 ]->set_source_for_device (device);
312
+ m_views[VIEW_IDX_DISASM ]->set_source_for_device (device);
313
+ m_views[VIEW_IDX_STATE ]->set_source_for_device (device);
306
314
307
315
// then update the caption
308
316
std::string title = string_format (" Debug: %s - %s '%s'" , device.machine ().system ().name , device.name (), device.tag ());
@@ -327,7 +335,7 @@ void consolewin_info::recompute_children()
327
335
regrect.top = parent.top + EDGE_WIDTH;
328
336
regrect.bottom = parent.bottom - EDGE_WIDTH;
329
337
regrect.left = parent.left + EDGE_WIDTH;
330
- regrect.right = regrect.left + m_views[1 ]->maxwidth ();
338
+ regrect.right = regrect.left + m_views[VIEW_IDX_STATE ]->maxwidth ();
331
339
332
340
// edit box goes at the bottom of the remaining area
333
341
RECT editrect;
@@ -350,9 +358,9 @@ void consolewin_info::recompute_children()
350
358
conrect.right = parent.right - EDGE_WIDTH;
351
359
352
360
// set the bounds of things
353
- m_views[0 ]->set_bounds (disrect);
354
- m_views[1 ]->set_bounds (regrect);
355
- m_views[2 ]->set_bounds (conrect);
361
+ m_views[VIEW_IDX_DISASM ]->set_bounds (disrect);
362
+ m_views[VIEW_IDX_STATE ]->set_bounds (regrect);
363
+ m_views[VIEW_IDX_CONSOLE ]->set_bounds (conrect);
356
364
set_editwnd_bounds (editrect);
357
365
}
358
366
0 commit comments