本文整理汇总了C++中running_machine::video方法的典型用法代码示例。如果您正苦于以下问题:C++ running_machine::video方法的具体用法?C++ running_machine::video怎么用?C++ running_machine::video使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类running_machine
的用法示例。
在下文中一共展示了running_machine::video方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: lock_buffer
//============================================================
// lock_buffer
//============================================================
static int lock_buffer(running_machine &machine, long offset, long size, void **buffer1, long *length1, void **buffer2, long *length2)
{
volatile long pstart, pend, lstart, lend;
if (!buf_locked)
{
if (machine.video().throttled())
{
pstart = stream_playpos;
pend = (pstart + sdl_xfer_samples);
lstart = offset;
lend = lstart+size;
while (((pstart >= lstart) && (pstart <= lend)) ||
((pend >= lstart) && (pend <= lend)))
{
pstart = stream_playpos;
pend = pstart + sdl_xfer_samples;
}
}
SDL_LockAudio();
buf_locked++;
}
// init lengths
*length1 = *length2 = 0;
if ((offset + size) > stream_buffer_size)
{
// 2-piece case
*length1 = stream_buffer_size - offset;
*buffer1 = &stream_buffer[offset];
*length2 = size - *length1;
*buffer2 = stream_buffer;
}
else
{
// normal 1-piece case
*length1 = size;
*buffer1 = &stream_buffer[offset];
}
if (LOG_SOUND)
fprintf(sound_log, "locking %ld bytes at offset %ld (total %d, playpos %d): len1 %ld len2 %ld\n",
size, offset, stream_buffer_size, stream_playpos, *length1, *length2);
return 0;
}
示例2: TMS9928A_interrupt
int TMS9928A_interrupt(running_machine &machine) {
int b;
/* when skipping frames, calculate sprite collision */
if (machine.video().skip_this_frame()) {
if (TMS_SPRITES_ENABLED) {
draw_sprites (machine.primary_screen, NULL, NULL);
}
}
tms.StatusReg |= 0x80;
b = (tms.Regs[1] & 0x20) != 0;
if (b != tms.INT) {
tms.INT = b;
if (tms.INTCallback) tms.INTCallback (machine, tms.INT);
}
return b;
}
示例3: debugger_refresh_display
void debugger_refresh_display(running_machine &machine)
{
machine.video().frame_update(true);
}