Main > Software Forum
Want to display "Game Paused" on your screen?
Farmboy90:
Real quick if anyone is interested. When you pause your game, mame will darken the screen to indicate that it is paused. This isn't enough for me so I wanted to display the words "Game Paused" in the center of the screen.
I realize this problem has been solved before in a older thread but that code change was for an ancient build of mame.
For anyone running something this century you need only add this one line of code. I am using v0.102 of mame. So anything within a few builds of this should apply.
Open cpuexec.c. At around line 482 you see this code:
/* otherwise, just pump video updates through */
else
{
ui_draw_message_window("GAME PAUSED");
time_to_quit |= updatescreen();
reset_partial_updates();
}
Just add the line in bold and recompile. All done.
Necro:
Very nice...thanks!
hnugz:
that is good to know, i need to look into compiling my own eventually.
jelwell:
--- Quote from: Farmboy90 on February 07, 2006, 10:12:11 pm ---I realize this problem has been solved before in a older thread but that code change was for an ancient build of mame.
For anyone running something this century
--- End quote ---
*sigh* I'm officially ancient. It's worst then the time I realized that a girl I dated was born in a different decade.
Joseph Elwell.
Farmboy90:
No worries. The old post may work for you. Not sure where to find it though. Let me see if I can search for it....
I couldn't find it, however I do have the code change that needed to be made. Not sure if this aligns with your version.
diff -c -r ..\/src/usrintrf.c ./src/usrintrf.c
*** ..\/src/usrintrf.c Tue Nov 23 18:05:00 2004
--- ./src/usrintrf.c Thu Dec 16 22:33:16 2004
***************
*** 3940,3946 ****
if (input_ui_pressed(IPT_UI_CANCEL))
break;
! code = code_read_async();
if (code != CODE_NONE)
{
if (code >= KEYCODE_A && code <= KEYCODE_Z)
--- 3940,3947 ----
if (input_ui_pressed(IPT_UI_CANCEL))
break;
! //JOEY
! code = KEYCODE_A; //code_read_async();
if (code != CODE_NONE)
{
if (code >= KEYCODE_A && code <= KEYCODE_Z)
***************
*** 4153,4166 ****
--- 4154,4173 ----
if (single_step == 0)
mame_pause(1);
+ // JOEY ADD PAUSE text
+ ui_text(bitmap, "GAME PAUSED", 100, 100);
+
while (!input_ui_pressed(IPT_UI_PAUSE))
{
+
profiler_mark(PROFILER_VIDEO);
if (osd_skip_this_frame() == 0)
{
/* keep calling vh_screenrefresh() while paused so we can stuff */
/* debug code in there */
draw_screen();
+ // JOEY ADD PAUSE text
+ ui_text(bitmap, "GAME PAUSED", 100, 100);
}
profiler_mark(PROFILER_END);
***************
*** 4206,4211 ****
--- 4213,4221 ----
}
if (osd_selected != 0) osd_selected = on_screen_display(bitmap, osd_selected);
+ // JOEY ADD PAUSE text
+ // ui_text(bitmap, "GAME PAUSED", 100, 100);
+
if (options.cheat) DisplayWatches(bitmap);
/* show popup message if any */
***************
*** 4220,4225 ****
--- 4230,4238 ----
update_video_and_audio();
reset_partial_updates();
+ // JOEY ADD PAUSE text
+ // ui_text(bitmap, "GAME PAUSED", 100, 100);
+
#ifdef MESS
if (!setup_selected && mess_pause_for_ui)
{
***************
*** 4238,4243 ****
--- 4251,4258 ----
}
schedule_full_refresh();
+ // JOEY ADD PAUSE text
+ ui_text(bitmap, "GAME PAUSED", 100, 100);
}
#if defined(__sgi) && !defined(MESS)
Navigation
[0] Message Index
[#] Next page
Go to full version