summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd
diff options
context:
space:
mode:
authorGravatarGravatar Vas Crabb <vas@vastheman.com>2019-10-11 03:21:25 +1100
committerGravatarGravatar Vas Crabb <vas@vastheman.com>2019-10-11 03:21:25 +1100
commitb8aaf9806c2d9aee34d3b5467b601ea855d65ba0 (patch)
tree0eb09e6cfa05cd9314d3be31deebe92fe7a97390 /src/osd
parent52d873062c8025915d55b15547edc66de0f17492 (diff)
(nw) misc cleanup:
* imagedev/cassette: add bitwise operators for cassette_state so a lot of ugly casts can go away * audio/leland.cpp, cubeqst.cpp: make better use of loops in machine configuration
Diffstat (limited to 'src/osd')
-rw-r--r--src/osd/modules/debugger/win/consolewininfo.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/osd/modules/debugger/win/consolewininfo.cpp b/src/osd/modules/debugger/win/consolewininfo.cpp
index a9811f5fc93..88367c09fc9 100644
--- a/src/osd/modules/debugger/win/consolewininfo.cpp
+++ b/src/osd/modules/debugger/win/consolewininfo.cpp
@@ -199,7 +199,7 @@ void consolewin_info::update_menu()
if (img.device().type() == CASSETTE)
{
- cassette_state const state = cassette_state(downcast<cassette_image_device *>(&img.device())->get_state() & CASSETTE_MASK_UISTATE);
+ cassette_state const state = downcast<cassette_image_device *>(&img.device())->get_state() & CASSETTE_MASK_UISTATE;
AppendMenu(devicesubmenu, MF_SEPARATOR, 0, nullptr);
AppendMenu(devicesubmenu, flags_for_exists | ((state == CASSETTE_STOPPED) ? MF_CHECKED : 0), new_item + DEVOPTION_CASSETTE_STOPPAUSE, TEXT("Pause/Stop"));
AppendMenu(devicesubmenu, flags_for_exists | ((state == CASSETTE_PLAY) ? MF_CHECKED : 0), new_item + DEVOPTION_CASSETTE_PLAY, TEXT("Play"));
@@ -208,9 +208,9 @@ void consolewin_info::update_menu()
AppendMenu(devicesubmenu, flags_for_exists, new_item + DEVOPTION_CASSETTE_FASTFORWARD, TEXT("Fast Forward"));
AppendMenu(devicesubmenu, MF_SEPARATOR, 0, nullptr);
// Motor state can be overriden by the driver
- cassette_state const motor_state = cassette_state(downcast<cassette_image_device *>(&img.device())->get_state() & CASSETTE_MASK_MOTOR);
+ cassette_state const motor_state = downcast<cassette_image_device *>(&img.device())->get_state() & CASSETTE_MASK_MOTOR;
AppendMenu(devicesubmenu, flags_for_exists | ((motor_state == CASSETTE_MOTOR_ENABLED) ? MF_CHECKED : 0), new_item + DEVOPTION_CASSETTE_MOTOR, TEXT("Motor"));
- cassette_state const speaker_state = cassette_state(downcast<cassette_image_device *>(&img.device())->get_state() & CASSETTE_MASK_SPEAKER);
+ cassette_state const speaker_state = downcast<cassette_image_device *>(&img.device())->get_state() & CASSETTE_MASK_SPEAKER;
AppendMenu(devicesubmenu, flags_for_exists | ((speaker_state == CASSETTE_SPEAKER_ENABLED) ? MF_CHECKED : 0), new_item + DEVOPTION_CASSETTE_SOUND, TEXT("Audio while Loading"));
}
}