summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/ui/sliders.cpp
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-10-22 13:13:17 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2016-10-22 13:13:17 +0200
commitddb290d5f615019c33c42b8d94e5a5254cabcf33 (patch)
treea70f688b0df3acd19da7b1151e5902e3c6af3fa5 /src/frontend/mame/ui/sliders.cpp
parent333bff8de64dfaeb98134000412796b4fdef970b (diff)
NOTICE (TYPE NAME CONSOLIDATION)
Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8 also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
Diffstat (limited to 'src/frontend/mame/ui/sliders.cpp')
-rw-r--r--src/frontend/mame/ui/sliders.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/frontend/mame/ui/sliders.cpp b/src/frontend/mame/ui/sliders.cpp
index a4e66b74802..f311243f1ae 100644
--- a/src/frontend/mame/ui/sliders.cpp
+++ b/src/frontend/mame/ui/sliders.cpp
@@ -42,8 +42,8 @@ void menu_sliders::handle()
if (menu_event->itemref != nullptr && menu_event->type == menu_item_type::SLIDER)
{
const slider_state *slider = (const slider_state *)menu_event->itemref;
- INT32 curvalue = slider->update(machine(), slider->arg, slider->id, nullptr, SLIDER_NOCHANGE);
- INT32 increment = 0;
+ int32_t curvalue = slider->update(machine(), slider->arg, slider->id, nullptr, SLIDER_NOCHANGE);
+ int32_t increment = 0;
bool alt_pressed = machine().input().code_pressed(KEYCODE_LALT) || machine().input().code_pressed(KEYCODE_RALT);
bool ctrl_pressed = machine().input().code_pressed(KEYCODE_LCONTROL) || machine().input().code_pressed(KEYCODE_RCONTROL);
bool shift_pressed = machine().input().code_pressed(KEYCODE_LSHIFT) || machine().input().code_pressed(KEYCODE_RSHIFT);
@@ -95,7 +95,7 @@ void menu_sliders::handle()
// handle any changes
if (increment != 0)
{
- INT32 newvalue = curvalue + increment;
+ int32_t newvalue = curvalue + increment;
// clamp within bounds
if (newvalue < slider->minval)
@@ -146,8 +146,8 @@ void menu_sliders::populate()
if (item.type == menu_item_type::SLIDER)
{
slider_state* slider = reinterpret_cast<slider_state *>(item.ref);
- INT32 curval = slider->update(machine(), slider->arg, slider->id, &tempstring, SLIDER_NOCHANGE);
- UINT32 flags = 0;
+ int32_t curval = slider->update(machine(), slider->arg, slider->id, &tempstring, SLIDER_NOCHANGE);
+ uint32_t flags = 0;
if (curval > slider->minval)
flags |= FLAG_LEFT_ARROW;
if (curval < slider->maxval)
@@ -169,8 +169,8 @@ void menu_sliders::populate()
if (item.type == menu_item_type::SLIDER)
{
slider_state* slider = reinterpret_cast<slider_state *>(item.ref);
- INT32 curval = slider->update(machine(), slider->arg, slider->id, &tempstring, SLIDER_NOCHANGE);
- UINT32 flags = 0;
+ int32_t curval = slider->update(machine(), slider->arg, slider->id, &tempstring, SLIDER_NOCHANGE);
+ uint32_t flags = 0;
if (curval > slider->minval)
flags |= FLAG_LEFT_ARROW;
if (curval < slider->maxval)
@@ -201,7 +201,7 @@ void menu_sliders::custom_render(void *selectedref, float top, float bottom, flo
float percentage, default_percentage;
std::string tempstring;
float text_height;
- INT32 curval;
+ int32_t curval;
// determine the current value and text
curval = curslider->update(machine(), curslider->arg, curslider->id, &tempstring, SLIDER_NOCHANGE);
@@ -263,9 +263,9 @@ void menu_sliders::custom_render(void *selectedref, float top, float bottom, flo
// standard menu handler
//-------------------------------------------------
-UINT32 menu_sliders::ui_handler(render_container &container, mame_ui_manager &mui)
+uint32_t menu_sliders::ui_handler(render_container &container, mame_ui_manager &mui)
{
- UINT32 result;
+ uint32_t result;
// if this is the first call, push the sliders menu
if (topmost_menu<menu_sliders>(mui.machine()) == nullptr)