Remove some deprecat.h includes from osd layer:
* add machine as parameter to osd_update and osd_update_audio_stream * change Machine to machine and remove include deprecat.h
This commit is contained in:
parent
830cc527f1
commit
dd0ebc1d8d
@ -796,7 +796,7 @@ static TIMER_CALLBACK( sound_update )
|
|||||||
/* play the result */
|
/* play the result */
|
||||||
if (finalmix_offset > 0)
|
if (finalmix_offset > 0)
|
||||||
{
|
{
|
||||||
osd_update_audio_stream(finalmix, finalmix_offset / 2);
|
osd_update_audio_stream(machine, finalmix, finalmix_offset / 2);
|
||||||
if (wavfile != NULL)
|
if (wavfile != NULL)
|
||||||
wav_add_data_16(wavfile, finalmix, finalmix_offset);
|
wav_add_data_16(wavfile, finalmix, finalmix_offset);
|
||||||
}
|
}
|
||||||
|
@ -1185,7 +1185,7 @@ void video_frame_update(running_machine *machine, int debug)
|
|||||||
|
|
||||||
/* ask the OSD to update */
|
/* ask the OSD to update */
|
||||||
profiler_mark(PROFILER_BLIT);
|
profiler_mark(PROFILER_BLIT);
|
||||||
osd_update(!debug && skipped_it);
|
osd_update(machine, !debug && skipped_it);
|
||||||
profiler_mark(PROFILER_END);
|
profiler_mark(PROFILER_END);
|
||||||
|
|
||||||
/* perform tasks for this frame */
|
/* perform tasks for this frame */
|
||||||
|
@ -106,7 +106,7 @@ void osd_wait_for_debugger(void);
|
|||||||
|
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
void osd_update(int skip_redraw);
|
void osd_update(running_machine *machine, int skip_redraw);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -117,7 +117,7 @@ void osd_update(int skip_redraw);
|
|||||||
|
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
void osd_update_audio_stream(INT16 *buffer, int samples_this_frame);
|
void osd_update_audio_stream(running_machine *machine, INT16 *buffer, int samples_this_frame);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
control master volume. attenuation is the attenuation in dB (a negative
|
control master volume. attenuation is the attenuation in dB (a negative
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
#include "osdepend.h"
|
#include "osdepend.h"
|
||||||
#include "driver.h"
|
#include "driver.h"
|
||||||
#include "osdepend.h"
|
#include "osdepend.h"
|
||||||
#include "deprecat.h"
|
|
||||||
|
|
||||||
// MAMEOS headers
|
// MAMEOS headers
|
||||||
#include "winmain.h"
|
#include "winmain.h"
|
||||||
@ -74,7 +73,7 @@ static FILE * sound_log;
|
|||||||
//============================================================
|
//============================================================
|
||||||
|
|
||||||
static void sound_exit(running_machine *machine);
|
static void sound_exit(running_machine *machine);
|
||||||
static HRESULT dsound_init(void);
|
static HRESULT dsound_init(running_machine *machine);
|
||||||
static void dsound_kill(void);
|
static void dsound_kill(void);
|
||||||
static HRESULT dsound_create_buffers(void);
|
static HRESULT dsound_create_buffers(void);
|
||||||
static void dsound_destroy_buffers(void);
|
static void dsound_destroy_buffers(void);
|
||||||
@ -100,7 +99,7 @@ void winsound_init(running_machine *machine)
|
|||||||
|
|
||||||
// attempt to initialize directsound
|
// attempt to initialize directsound
|
||||||
// don't make it fatal if we can't -- we'll just run without sound
|
// don't make it fatal if we can't -- we'll just run without sound
|
||||||
dsound_init();
|
dsound_init(machine);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -174,7 +173,7 @@ static void copy_sample_data(INT16 *data, int bytes_to_copy)
|
|||||||
// osd_update_audio_stream
|
// osd_update_audio_stream
|
||||||
//============================================================
|
//============================================================
|
||||||
|
|
||||||
void osd_update_audio_stream(INT16 *buffer, int samples_this_frame)
|
void osd_update_audio_stream(running_machine *machine, INT16 *buffer, int samples_this_frame)
|
||||||
{
|
{
|
||||||
int bytes_this_frame = samples_this_frame * stream_format.nBlockAlign;
|
int bytes_this_frame = samples_this_frame * stream_format.nBlockAlign;
|
||||||
DWORD play_position, write_position;
|
DWORD play_position, write_position;
|
||||||
@ -248,7 +247,7 @@ void osd_set_mastervolume(int attenuation)
|
|||||||
// dsound_init
|
// dsound_init
|
||||||
//============================================================
|
//============================================================
|
||||||
|
|
||||||
static HRESULT dsound_init(void)
|
static HRESULT dsound_init(running_machine *machine)
|
||||||
{
|
{
|
||||||
HRESULT result;
|
HRESULT result;
|
||||||
|
|
||||||
@ -281,7 +280,7 @@ static HRESULT dsound_init(void)
|
|||||||
stream_format.wBitsPerSample = 16;
|
stream_format.wBitsPerSample = 16;
|
||||||
stream_format.wFormatTag = WAVE_FORMAT_PCM;
|
stream_format.wFormatTag = WAVE_FORMAT_PCM;
|
||||||
stream_format.nChannels = 2;
|
stream_format.nChannels = 2;
|
||||||
stream_format.nSamplesPerSec = Machine->sample_rate;
|
stream_format.nSamplesPerSec = machine->sample_rate;
|
||||||
stream_format.nBlockAlign = stream_format.wBitsPerSample * stream_format.nChannels / 8;
|
stream_format.nBlockAlign = stream_format.wBitsPerSample * stream_format.nChannels / 8;
|
||||||
stream_format.nAvgBytesPerSec = stream_format.nSamplesPerSec * stream_format.nBlockAlign;
|
stream_format.nAvgBytesPerSec = stream_format.nSamplesPerSec * stream_format.nBlockAlign;
|
||||||
|
|
||||||
|
@ -30,7 +30,6 @@
|
|||||||
#include "render.h"
|
#include "render.h"
|
||||||
#include "rendutil.h"
|
#include "rendutil.h"
|
||||||
#include "ui.h"
|
#include "ui.h"
|
||||||
#include "deprecat.h"
|
|
||||||
|
|
||||||
// MAMEOS headers
|
// MAMEOS headers
|
||||||
#include "winmain.h"
|
#include "winmain.h"
|
||||||
@ -77,8 +76,8 @@ static win_monitor_info *pick_monitor(int index);
|
|||||||
|
|
||||||
static void check_osd_inputs(void);
|
static void check_osd_inputs(void);
|
||||||
|
|
||||||
static void extract_video_config(void);
|
static void extract_video_config(running_machine *machine);
|
||||||
static void load_effect_overlay(const char *filename);
|
static void load_effect_overlay(running_machine *machine, const char *filename);
|
||||||
static float get_aspect(const char *name, int report_error);
|
static float get_aspect(const char *name, int report_error);
|
||||||
static void get_resolution(const char *name, win_window_config *config, int report_error);
|
static void get_resolution(const char *name, win_window_config *config, int report_error);
|
||||||
|
|
||||||
@ -96,7 +95,7 @@ void winvideo_init(running_machine *machine)
|
|||||||
add_exit_callback(machine, video_exit);
|
add_exit_callback(machine, video_exit);
|
||||||
|
|
||||||
// extract data from the options
|
// extract data from the options
|
||||||
extract_video_config();
|
extract_video_config(machine);
|
||||||
|
|
||||||
// set up monitors first
|
// set up monitors first
|
||||||
init_monitors();
|
init_monitors();
|
||||||
@ -203,7 +202,7 @@ win_monitor_info *winvideo_monitor_from_handle(HMONITOR hmonitor)
|
|||||||
// osd_update
|
// osd_update
|
||||||
//============================================================
|
//============================================================
|
||||||
|
|
||||||
void osd_update(int skip_redraw)
|
void osd_update(running_machine *machine, int skip_redraw)
|
||||||
{
|
{
|
||||||
win_window_info *window;
|
win_window_info *window;
|
||||||
|
|
||||||
@ -375,7 +374,7 @@ static void check_osd_inputs(void)
|
|||||||
// extract_video_config
|
// extract_video_config
|
||||||
//============================================================
|
//============================================================
|
||||||
|
|
||||||
static void extract_video_config(void)
|
static void extract_video_config(running_machine *machine)
|
||||||
{
|
{
|
||||||
const char *stemp;
|
const char *stemp;
|
||||||
|
|
||||||
@ -391,7 +390,7 @@ static void extract_video_config(void)
|
|||||||
#endif
|
#endif
|
||||||
stemp = options_get_string(mame_options(), WINOPTION_EFFECT);
|
stemp = options_get_string(mame_options(), WINOPTION_EFFECT);
|
||||||
if (strcmp(stemp, "none") != 0)
|
if (strcmp(stemp, "none") != 0)
|
||||||
load_effect_overlay(stemp);
|
load_effect_overlay(machine, stemp);
|
||||||
|
|
||||||
// per-window options: extract the data
|
// per-window options: extract the data
|
||||||
get_resolution(WINOPTION_RESOLUTION0, &video_config.window[0], TRUE);
|
get_resolution(WINOPTION_RESOLUTION0, &video_config.window[0], TRUE);
|
||||||
@ -449,7 +448,7 @@ static void extract_video_config(void)
|
|||||||
// load_effect_overlay
|
// load_effect_overlay
|
||||||
//============================================================
|
//============================================================
|
||||||
|
|
||||||
static void load_effect_overlay(const char *filename)
|
static void load_effect_overlay(running_machine *machine, const char *filename)
|
||||||
{
|
{
|
||||||
char *tempstr = malloc_or_die(strlen(filename) + 5);
|
char *tempstr = malloc_or_die(strlen(filename) + 5);
|
||||||
int numscreens;
|
int numscreens;
|
||||||
@ -473,7 +472,7 @@ static void load_effect_overlay(const char *filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// set the overlay on all screens
|
// set the overlay on all screens
|
||||||
numscreens = video_screen_count(Machine->config);
|
numscreens = video_screen_count(machine->config);
|
||||||
for (scrnum = 0; scrnum < numscreens; scrnum++)
|
for (scrnum = 0; scrnum < numscreens; scrnum++)
|
||||||
render_container_set_overlay(render_container_get_screen(scrnum), effect_bitmap);
|
render_container_set_overlay(render_container_get_screen(scrnum), effect_bitmap);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user