diff --git a/Kaiplayer/DropFiles.cpp b/Kaiplayer/DropFiles.cpp index 86e44c592..38f8359a3 100644 --- a/Kaiplayer/DropFiles.cpp +++ b/Kaiplayer/DropFiles.cpp @@ -31,11 +31,11 @@ bool DragnDrop::OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filenames wxString ext = filenames[0].AfterLast('.').Lower(); bool isLuaScript = ext == "lua" || ext == "moon"; int w,h; - Kai->GetClientSize(&w,&h); - h -= (Kai->Menubar->GetSize().y); - x -= iconsize; + Kai->Tabs->GetClientSize(&w,&h); + //h -= (Kai->Menubar->GetSize().y); + //x -= iconsize; if (!isLuaScript){ - if (y >= h && y <= h + Kai->Tabs->GetHeight()){ + if (y >= h - Kai->Tabs->GetHeight()){ int pixels; int tab = Kai->Tabs->FindTab(x, &pixels); if (tab < 0){ Kai->InsertTab(); } diff --git a/Kaiplayer/VersionKainote.h b/Kaiplayer/VersionKainote.h index 855244f90..d1a2b9602 100644 --- a/Kaiplayer/VersionKainote.h +++ b/Kaiplayer/VersionKainote.h @@ -20,5 +20,5 @@ //StableReleaseLink: https://github.com/bjakja/Kainote/releases/download/v0.9.3.893/Kainote.x64.zip //VersionKainoteX86: 0.9.3.910 -#define VersionKainote "0.9.3.914" -#define NumVersionKainote 0,9,3,914 +#define VersionKainote "0.9.3.916" +#define NumVersionKainote 0,9,3,916 diff --git a/Kaiplayer/VideoFfmpeg.cpp b/Kaiplayer/VideoFfmpeg.cpp index 1c894d0b7..85d2c5e2c 100644 --- a/Kaiplayer/VideoFfmpeg.cpp +++ b/Kaiplayer/VideoFfmpeg.cpp @@ -115,15 +115,15 @@ void VideoFfmpeg::Processing() lastframe = rend->lastframe; } if (lockGetFrame) - GetFFMSFrame(rend->lastframe, buff); + GetFFMSFrame(rend->lastframe); else{ fframe = FFMS_GetFrame(videosource, rend->lastframe, &errinfo); + } - if (!fframe){ - continue; - } - memcpy(&buff[0], fframe->Data[0], fplane); + if (!fframe){ + continue; } + memcpy(&buff[0], fframe->Data[0], fplane); rend->DrawTexture(buff); rend->Render(false); @@ -163,17 +163,17 @@ void VideoFfmpeg::Processing() byte *buff = (byte*)rend->datas; if(rend->lastframe != lastframe){ if (lockGetFrame) - GetFFMSFrame(rend->lastframe, buff); + GetFFMSFrame(rend->lastframe); else{ fframe = FFMS_GetFrame(videosource, rend->lastframe, &errinfo); - if (!fframe){ - SetEvent(eventComplete); isBusy = false; continue; - } - memcpy(&buff[0], fframe->Data[0], fplane); } lastframe = rend->lastframe; } - + if (!fframe){ + SetEvent(eventComplete); isBusy = false; continue; + } + memcpy(&buff[0], fframe->Data[0], fplane); + rend->DrawTexture(buff); rend->Render(false); @@ -535,11 +535,11 @@ void VideoFfmpeg::GetFrame(int ttime, byte *buff) } -void VideoFfmpeg::GetFFMSFrame(int numframe, byte *buff) +void VideoFfmpeg::GetFFMSFrame(int numframe) { wxCriticalSectionLocker lock(blockaudio); fframe = FFMS_GetFrame(videosource, rend->lastframe, &errinfo); - memcpy(&buff[0], fframe->Data[0], fplane); + //memcpy(buff, fframe->Data[0], fplane); } void VideoFfmpeg::GetAudio(void *buf, int64_t start, int64_t count) diff --git a/Kaiplayer/VideoFfmpeg.h b/Kaiplayer/VideoFfmpeg.h index eff6cba88..225ce7fff 100644 --- a/Kaiplayer/VideoFfmpeg.h +++ b/Kaiplayer/VideoFfmpeg.h @@ -109,7 +109,7 @@ class VideoFfmpeg char **Cache; int blnum; void GetAudio(void *buf, int64_t start, int64_t count); - void GetFFMSFrame(int numframe, byte *buf); + void GetFFMSFrame(int numframe); volatile bool stopLoadingAudio = false; }; diff --git a/Kaiplayer/kainoteMain.cpp b/Kaiplayer/kainoteMain.cpp index fe9832d12..87bb37b94 100644 --- a/Kaiplayer/kainoteMain.cpp +++ b/Kaiplayer/kainoteMain.cpp @@ -281,7 +281,7 @@ kainoteFrame::kainoteFrame(const wxPoint &pos, const wxSize &size) }); Bind(wxEVT_ACTIVATE, &kainoteFrame::OnActivate, this); Connect(SnapWithStart, SnapWithEnd, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction)&kainoteFrame::OnAudioSnap); - SetDropTarget(new DragnDrop(this)); + Tabs->SetDropTarget(new DragnDrop(this)); Bind(wxEVT_SIZE, &kainoteFrame::OnSize, this);