summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/cheat.cpp
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2016-04-26 16:37:43 -0400
committer AJR <ajrhacker@users.noreply.github.com>2016-04-26 16:37:43 -0400
commite06384aaba8f618ad049d9fe933c76eccf24594a (patch)
treef61522b73dcae33281045d6a88f45034fd3310b0 /src/frontend/mame/cheat.cpp
parent0b1ca9b15dd8baf20ce4abd1879478e8dd65ecfb (diff)
Relieve UI menus and such from having to constantly fetch UI object from global state (nw)
Diffstat (limited to 'src/frontend/mame/cheat.cpp')
-rw-r--r--src/frontend/mame/cheat.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/frontend/mame/cheat.cpp b/src/frontend/mame/cheat.cpp
index 2c48e8c6375..32dc85df1b6 100644
--- a/src/frontend/mame/cheat.cpp
+++ b/src/frontend/mame/cheat.cpp
@@ -75,6 +75,7 @@
#include "emu.h"
#include "emuopts.h"
#include "xmlfile.h"
+#include "mame.h"
#include "ui/ui.h"
#include "ui/menu.h"
#include "cheat.h"
@@ -1221,17 +1222,17 @@ bool cheat_manager::save_all(const char *filename)
// render text
//-------------------------------------------------
-void cheat_manager::render_text(render_container &container)
+void cheat_manager::render_text(mame_ui_manager &mui, render_container &container)
{
// render any text and free it along the way
for (int linenum = 0; linenum < m_output.size(); linenum++)
if (!m_output[linenum].empty())
{
// output the text
- mame_machine_manager::instance()->ui().draw_text_full(&container, m_output[linenum].c_str(),
- 0.0f, (float)linenum * mame_machine_manager::instance()->ui().get_line_height(), 1.0f,
+ mui.draw_text_full(&container, m_output[linenum].c_str(),
+ 0.0f, (float)linenum * mui.get_line_height(), 1.0f,
m_justify[linenum], WRAP_NEVER, DRAW_OPAQUE,
- ARGB_WHITE, ARGB_BLACK, nullptr, nullptr);
+ rgb_t::white, rgb_t::black, nullptr, nullptr);
}
}