Small fixes

This commit is contained in:
Nekotekina 2014-06-30 01:08:56 +04:00
parent 6f1efc851f
commit cf98ddf979
5 changed files with 19 additions and 20 deletions

View file

@ -151,6 +151,7 @@ public:
std::mutex m_cs_main; std::mutex m_cs_main;
SSemaphore m_sem_flush; SSemaphore m_sem_flush;
SSemaphore m_sem_flip; SSemaphore m_sem_flip;
u64 m_last_flip_time;
Callback m_flip_handler; Callback m_flip_handler;
Callback m_user_handler; Callback m_user_handler;
u64 m_vblank_count; u64 m_vblank_count;

View file

@ -1158,6 +1158,7 @@ public:
~AudioDecoder() ~AudioDecoder()
{ {
// TODO: check finalization
if (ctx) if (ctx)
{ {
for (u32 i = frames.GetCount() - 1; ~i; i--) for (u32 i = frames.GetCount() - 1; ~i; i--)

View file

@ -145,22 +145,20 @@ u32 dmuxOpen(Demuxer* data)
if (esATX[ch]) if (esATX[ch])
{ {
ElementaryStream& es = *esATX[ch]; ElementaryStream& es = *esATX[ch];
while (es.isfull()) if (es.isfull())
{
if (Emu.IsStopped())
{
LOG_WARNING(HLE, "esATX[%d] was full, waiting aborted", ch);
return;
}
Sleep(1);
}
if (es.hasunseen()) // hack, probably useless
{ {
stream = backup; stream = backup;
Sleep(1);
continue; continue;
} }
/*if (es.hasunseen()) // hack, probably useless
{
stream = backup;
Sleep(1);
continue;
}*/
stream.skip(4); stream.skip(4);
len -= 4; len -= 4;
@ -194,14 +192,10 @@ u32 dmuxOpen(Demuxer* data)
if (esAVC[ch]) if (esAVC[ch])
{ {
ElementaryStream& es = *esAVC[ch]; ElementaryStream& es = *esAVC[ch];
while (es.isfull()) if (es.isfull())
{ {
if (Emu.IsStopped())
{
LOG_WARNING(HLE, "esAVC[%d] was full, waiting aborted", ch);
return;
}
Sleep(1); Sleep(1);
continue;
} }
DemuxerStream backup = stream; DemuxerStream backup = stream;
@ -217,11 +211,12 @@ u32 dmuxOpen(Demuxer* data)
if (pes.new_au && es.hasdata()) // new AU detected if (pes.new_au && es.hasdata()) // new AU detected
{ {
if (es.hasunseen()) // hack, probably useless /*if (es.hasunseen()) // hack, probably useless
{ {
stream = backup; stream = backup;
Sleep(1);
continue; continue;
} }*/
es.finish(stream); es.finish(stream);
// callback // callback
mem_ptr_t<CellDmuxEsMsg> esMsg(a128(dmux.memAddr) + (cb_add ^= 16)); mem_ptr_t<CellDmuxEsMsg> esMsg(a128(dmux.memAddr) + (cb_add ^= 16));
@ -242,6 +237,7 @@ u32 dmuxOpen(Demuxer* data)
if (es.isfull()) if (es.isfull())
{ {
stream = backup; stream = backup;
Sleep(1);
continue; continue;
} }

View file

@ -766,6 +766,7 @@ public:
~VideoDecoder() ~VideoDecoder()
{ {
// TODO: check finalization
if (ctx) if (ctx)
{ {
for (u32 i = frames.GetCount() - 1; ~i; i--) for (u32 i = frames.GetCount() - 1; ~i; i--)

View file

@ -88,7 +88,7 @@ struct wxWriter : Log::LogListener
default: default:
break; break;
} }
llogcon->AppendText(wxString(msg.mText)); llogcon->AppendText(fmt::FromUTF8(msg.mText));
} }
} }
if (m_log->GetLastPosition() > GUI_BUFFER_MAX_SIZE) if (m_log->GetLastPosition() > GUI_BUFFER_MAX_SIZE)