diff options
-rw-r--r-- | src/emu/disound.c | 12 | ||||
-rw-r--r-- | src/emu/disound.h | 2 | ||||
-rw-r--r-- | src/emu/machine/ldcore.c | 9 | ||||
-rw-r--r-- | src/lib/util/options.c | 12 | ||||
-rw-r--r-- | src/osd/sdl/watchdog.c | 2 | ||||
-rw-r--r-- | src/osd/windows/vconv.c | 1 | ||||
-rw-r--r-- | src/osd/windows/winmain.c | 4 | ||||
-rw-r--r-- | src/osd/windows/winwork.c | 10 |
8 files changed, 37 insertions, 15 deletions
diff --git a/src/emu/disound.c b/src/emu/disound.c index dc95309f0b1..4045c72ce58 100644 --- a/src/emu/disound.c +++ b/src/emu/disound.c @@ -81,7 +81,7 @@ void device_sound_interface::static_add_route(device_t &device, UINT32 output, c // append a new route to the list astring devtag; device.siblingtag(devtag, target); - sound->m_route_list.append(*global_alloc(sound_route(output, input, gain, core_strdup(devtag.cstr())))); + sound->m_route_list.append(*global_alloc(sound_route(output, input, gain, devtag.cstr()))); } @@ -229,10 +229,10 @@ bool device_sound_interface::interface_validity_check(emu_options &options, cons for (const sound_route *route = first_route(); route != NULL; route = route->next()) { // find a device with the requested tag - const device_t *target = device().mconfig().devicelist().find(route->m_target); + const device_t *target = device().mconfig().devicelist().find(route->m_target.cstr()); if (target == NULL) { - mame_printf_error("%s: %s attempting to route sound to non-existant device '%s'\n", driver.source_file, driver.name, route->m_target); + mame_printf_error("%s: %s attempting to route sound to non-existant device '%s'\n", driver.source_file, driver.name, route->m_target.cstr()); error = true; } @@ -240,7 +240,7 @@ bool device_sound_interface::interface_validity_check(emu_options &options, cons const device_sound_interface *sound; if (target != NULL && target->type() != SPEAKER && !target->interface(sound)) { - mame_printf_error("%s: %s attempting to route sound to a non-sound device '%s' (%s)\n", driver.source_file, driver.name, route->m_target, target->name()); + mame_printf_error("%s: %s attempting to route sound to a non-sound device '%s' (%s)\n", driver.source_file, driver.name, route->m_target.cstr(), target->name()); error = true; } } @@ -316,13 +316,13 @@ void device_sound_interface::interface_post_start() int streamoutputnum; sound_stream *outputstream = sound->output_to_stream_output(outputnum, streamoutputnum); if (outputstream == NULL) - fatalerror("Sound device '%s' specifies route for non-existant output #%d", route->m_target, outputnum); + fatalerror("Sound device '%s' specifies route for non-existant output #%d", route->m_target.cstr(), outputnum); // find the input stream to connect to int streaminputnum; sound_stream *inputstream = input_to_stream_input(inputnum++, streaminputnum); if (inputstream == NULL) - fatalerror("Sound device '%s' targeted output #%d to non-existant device '%s' input %d", route->m_target, outputnum, m_device.tag(), inputnum - 1); + fatalerror("Sound device '%s' targeted output #%d to non-existant device '%s' input %d", route->m_target.cstr(), outputnum, m_device.tag(), inputnum - 1); // set the input inputstream->set_input(streaminputnum, outputstream, streamoutputnum, route->m_gain); diff --git a/src/emu/disound.h b/src/emu/disound.h index b5e8e4ad2eb..6eae08c3076 100644 --- a/src/emu/disound.h +++ b/src/emu/disound.h @@ -109,7 +109,7 @@ public: UINT32 m_output; // output index, or ALL_OUTPUTS UINT32 m_input; // target input index float m_gain; // gain - const char * m_target; // target tag + astring m_target; // target tag }; // construction/destruction diff --git a/src/emu/machine/ldcore.c b/src/emu/machine/ldcore.c index 5e847b8832d..58aade8c076 100644 --- a/src/emu/machine/ldcore.c +++ b/src/emu/machine/ldcore.c @@ -999,12 +999,9 @@ static STREAM_UPDATE( custom_stream_callback ) rightand = (ldcore->audiosquelch & 2) ? 0x0000 : 0xffff; /* see if we have enough samples to fill the buffer; if not, drop out */ - if (ld != NULL) - { - samples_avail = ldcore->audiobufin - ldcore->audiobufout; - if (samples_avail < 0) - samples_avail += ldcore->audiobufsize; - } + samples_avail = ldcore->audiobufin - ldcore->audiobufout; + if (samples_avail < 0) + samples_avail += ldcore->audiobufsize; /* if no attached ld, just clear the buffers */ if (samples_avail < samples) diff --git a/src/lib/util/options.c b/src/lib/util/options.c index ac7897fb6d3..9e7dbaeed08 100644 --- a/src/lib/util/options.c +++ b/src/lib/util/options.c @@ -224,7 +224,11 @@ core_options::~core_options() { // delete all entries from the list while (m_entrylist != NULL) + { + core_options::entry *e = m_entrylist; remove_entry(*m_entrylist); + delete e; + } } @@ -290,7 +294,11 @@ void core_options::add_entries(const options_entry *entrylist, bool override_exi { // if we're overriding existing entries, then remove the old one if (override_existing) + { + core_options::entry *e = m_entrylist; remove_entry(*existing); + delete e; + } // otherwise, just override the default and current values and throw out the new entry else @@ -608,7 +616,11 @@ void core_options::reset() { // remove all entries from the list while (m_entrylist != NULL) + { + core_options::entry *e = m_entrylist; remove_entry(*m_entrylist); + delete e; + } // reset the map m_entrymap.reset(); diff --git a/src/osd/sdl/watchdog.c b/src/osd/sdl/watchdog.c index 039a87639b6..db0ee8ee851 100644 --- a/src/osd/sdl/watchdog.c +++ b/src/osd/sdl/watchdog.c @@ -1,6 +1,6 @@ //============================================================ // -// watchdog.h - watchdog handling +// watchdog.c - watchdog handling // // Copyright (c) 1996-2011, Nicola Salmoria and the MAME Team. // Visit http://mamedev.org for licensing and usage restrictions. diff --git a/src/osd/windows/vconv.c b/src/osd/windows/vconv.c index 05afed42db2..e8917d9efd5 100644 --- a/src/osd/windows/vconv.c +++ b/src/osd/windows/vconv.c @@ -99,6 +99,7 @@ static const translation_info gcc_translate[] = { VS2005, "-fno-strict-aliasing", "" }, // deprecated in VS2005 { 0, "-fno-strict-aliasing", "/Oa" }, { 0, "-fno-omit-frame-pointer", "" }, + { 0, "-fomit-frame-pointer", "" }, { 0, "-Werror", "/WX" }, { VS7, "-Wall", "/Wall /W3 /wd4003 /wd4018 /wd4146 /wd4242 /wd4244 /wd4619 /wd4702 /wd4706 /wd4710 /wd4711 /wd4738 /wd4826" }, { 0, "-Wall", "/W0" }, diff --git a/src/osd/windows/winmain.c b/src/osd/windows/winmain.c index 1e28b869e82..ac77a688cc5 100644 --- a/src/osd/windows/winmain.c +++ b/src/osd/windows/winmain.c @@ -642,8 +642,10 @@ void windows_osd_interface::init(running_machine &machine) astring tempstring; for (win_window_info *info = win_window_list; info != NULL; info = info->next) { - tempstring.printf("Orientation(%s)", utf8_from_tstring(info->monitor->info.szDevice)); + char *tmp = utf8_from_tstring(info->monitor->info.szDevice); + tempstring.printf("Orientation(%s)", tmp); output_set_value(tempstring, info->targetorient); + osd_free(tmp); } // hook up the debugger log diff --git a/src/osd/windows/winwork.c b/src/osd/windows/winwork.c index 8c25eff0b58..816c0246d6d 100644 --- a/src/osd/windows/winwork.c +++ b/src/osd/windows/winwork.c @@ -279,6 +279,14 @@ INLINE void scalable_lock_release(scalable_lock *lock, INT32 myslot) } +INLINE void scalable_lock_delete(scalable_lock *lock) +{ +#if USE_SCALABLE_LOCKS +#else + DeleteCriticalSection(&lock->section); +#endif +} + //============================================================ // osd_work_queue_alloc @@ -486,6 +494,8 @@ void osd_work_queue_free(osd_work_queue *queue) // free the list if (queue->thread != NULL) free(queue->thread); + + scalable_lock_delete(&queue->lock); // free all the events if (queue->doneevent != NULL) |