mirror of
https://github.com/holub/mame
synced 2025-07-04 01:18:59 +03:00
fix osx compile (nw)
This commit is contained in:
parent
ac36da95aa
commit
2a87e99b21
@ -583,7 +583,7 @@ static void debugwin_view_update(debug_view &view, void *osdprivate)
|
|||||||
if (wholeLineScroll)
|
if (wholeLineScroll)
|
||||||
{
|
{
|
||||||
CGFloat const clamp = [self bounds].size.height - fontHeight - proposedVisibleRect.size.height;
|
CGFloat const clamp = [self bounds].size.height - fontHeight - proposedVisibleRect.size.height;
|
||||||
proposedVisibleRect.origin.y = std::min(proposedVisibleRect.origin.y, std::max(clamp, 0));
|
proposedVisibleRect.origin.y = std::min((int)proposedVisibleRect.origin.y, std::max((int)clamp, 0));
|
||||||
proposedVisibleRect.origin.y -= fmod(proposedVisibleRect.origin.y, fontHeight);
|
proposedVisibleRect.origin.y -= fmod(proposedVisibleRect.origin.y, fontHeight);
|
||||||
}
|
}
|
||||||
return proposedVisibleRect;
|
return proposedVisibleRect;
|
||||||
@ -668,7 +668,7 @@ static void debugwin_view_update(debug_view &view, void *osdprivate)
|
|||||||
inTextContainer:textContainer];
|
inTextContainer:textContainer];
|
||||||
if (start == 0)
|
if (start == 0)
|
||||||
box.origin.x = 0;
|
box.origin.x = 0;
|
||||||
box.size.width = std::max([self bounds].size.width - box.origin.x, 0);
|
box.size.width = std::max((int)([self bounds].size.width - box.origin.x), 0);
|
||||||
[[self backgroundForAttribute:attr] set];
|
[[self backgroundForAttribute:attr] set];
|
||||||
[NSBezierPath fillRect:NSMakeRect(box.origin.x,
|
[NSBezierPath fillRect:NSMakeRect(box.origin.x,
|
||||||
row * fontHeight,
|
row * fontHeight,
|
||||||
|
@ -350,7 +350,7 @@ NSString *const MAMEAuxiliaryDebugWindowWillCloseNotification = @"MAMEAuxiliaryD
|
|||||||
windowFrame.size.height = std::min(windowFrame.size.height, available.size.height);
|
windowFrame.size.height = std::min(windowFrame.size.height, available.size.height);
|
||||||
|
|
||||||
// arbitrary additional height limit
|
// arbitrary additional height limit
|
||||||
windowFrame.size.height = std::min(windowFrame.size.height, 320);
|
windowFrame.size.height = std::min((int)windowFrame.size.height, 320);
|
||||||
|
|
||||||
// place it in the bottom right corner and apply
|
// place it in the bottom right corner and apply
|
||||||
windowFrame.origin.x = available.origin.x + available.size.width - windowFrame.size.width;
|
windowFrame.origin.x = available.origin.x + available.size.width - windowFrame.size.width;
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
borderType:[logScroll borderType]];
|
borderType:[logScroll borderType]];
|
||||||
|
|
||||||
// this thing starts with no content, so its prefered height may be very small
|
// this thing starts with no content, so its prefered height may be very small
|
||||||
desired.height = std::max(desired.height, 240);
|
desired.height = std::max((int)desired.height, 240);
|
||||||
[self cascadeWindowWithDesiredSize:desired forView:logScroll];
|
[self cascadeWindowWithDesiredSize:desired forView:logScroll];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ private:
|
|||||||
EFFECT_COUNT_MAX = 10
|
EFFECT_COUNT_MAX = 10
|
||||||
};
|
};
|
||||||
|
|
||||||
UINT32 clamped_latency() const { return std::max(std::min(m_audio_latency, LATENCY_MAX), LATENCY_MIN); }
|
UINT32 clamped_latency() const { return std::max(std::min(UINT32(m_audio_latency), UINT32(LATENCY_MAX)), UINT32(LATENCY_MIN)); }
|
||||||
UINT32 buffer_avail() const { return ((m_writepos >= m_playpos) ? m_buffer_size : 0) + m_playpos - m_writepos; }
|
UINT32 buffer_avail() const { return ((m_writepos >= m_playpos) ? m_buffer_size : 0) + m_playpos - m_writepos; }
|
||||||
UINT32 buffer_used() const { return ((m_playpos > m_writepos) ? m_buffer_size : 0) + m_writepos - m_playpos; }
|
UINT32 buffer_used() const { return ((m_playpos > m_writepos) ? m_buffer_size : 0) + m_writepos - m_playpos; }
|
||||||
|
|
||||||
@ -228,7 +228,7 @@ int sound_coreaudio::init(const osd_options &options)
|
|||||||
|
|
||||||
// Allocate buffer
|
// Allocate buffer
|
||||||
m_headroom = m_sample_bytes * (clamped_latency() * sample_rate() / 40);
|
m_headroom = m_sample_bytes * (clamped_latency() * sample_rate() / 40);
|
||||||
m_buffer_size = m_sample_bytes * std::max(sample_rate() * (clamped_latency() + 3) / 40, 256);
|
m_buffer_size = m_sample_bytes * std::max(UINT32(sample_rate() * (clamped_latency() + 3) / 40), 256U);
|
||||||
m_buffer = global_alloc_array_clear<INT8>(m_buffer_size);
|
m_buffer = global_alloc_array_clear<INT8>(m_buffer_size);
|
||||||
if (!m_buffer)
|
if (!m_buffer)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user