Skip to content

Commit

Permalink
Added naming of AVX releases, fixed bad spectrum sizing after turn of…
Browse files Browse the repository at this point in the history
…f karaoke
  • Loading branch information
bjakja committed Feb 8, 2020
1 parent f18fb3a commit 7e2e363
Show file tree
Hide file tree
Showing 7 changed files with 118 additions and 107 deletions.
186 changes: 93 additions & 93 deletions Kainote.sln

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions Kaiplayer/AudioBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,13 +472,16 @@ void AudioBox::OnKaraoke(wxCommandEvent &event) {
audioDisplay->hasKara = !audioDisplay->hasKara;
int value = -1;
if (audioDisplay->hasKara){
lastVerticalZoom = HorizontalZoom->GetValue();
lastHorizontalZoom = HorizontalZoom->GetValue();
if (!audioDisplay->karaoke){ audioDisplay->karaoke = new Karaoke(audioDisplay); }
audioDisplay->karaoke->Split();
value = MAX(lastVerticalZoom - 20, 30);
value = MAX(lastHorizontalZoom - 20, 30);
}
else{
value = lastVerticalZoom;
if (lastHorizontalZoom > -1)
value = lastHorizontalZoom;
else
value = MIN(HorizontalZoom->GetValue() + 20, 70);
}
if (value > -1){
audioDisplay->SetSamplesPercent(value);
Expand Down
2 changes: 1 addition & 1 deletion Kaiplayer/AudioBox.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class AudioBox : public wxPanel {
bool holding;
bool arrows;
int oldy;
unsigned char lastVerticalZoom = -1;
char lastHorizontalZoom = -1;

public:
AudioDisplay *audioDisplay;
Expand Down
4 changes: 2 additions & 2 deletions Kaiplayer/Kaiplayer.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ git rev-parse --abbrev-ref HEAD &gt;&gt; gitparams.h</Command>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>c:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include;..\Thirdparty\BaseClasses;c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include;..\Thirdparty\Hunspell\src\hunspell;..\Thirdparty\wxWidgets\include;..\Thirdparty\wxWidgets\lib\vc_lib\mswu;..\Thirdparty\zlib-1.2.8;..\Thirdparty\freetype-2.6\include;..\Thirdparty\luajit\include;..\Thirdparty\luabins\include;..\Thirdparty\icu\source\common;..\Thirdparty\icu\source\i18n;..\Thirdparty\boost_1_61_0;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;NDEBUG;_WINDOWS;__WXMSW__;__WXDEBUG__;_MBCS;HUNSPELL_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;NDEBUG;_WINDOWS;__WXMSW__;__WXDEBUG__;_MBCS;HUNSPELL_STATIC;INSTRUCTIONS="AVX2";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<WarningLevel>Level3</WarningLevel>
Expand Down Expand Up @@ -458,7 +458,7 @@ git rev-parse --abbrev-ref HEAD &gt;&gt; gitparams.h</Command>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>c:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include;..\Thirdparty\BaseClasses;c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include;..\Thirdparty\Hunspell\src\hunspell;..\Thirdparty\wxWidgets\include;..\Thirdparty\wxWidgets\lib\vc_lib\mswu;..\Thirdparty\zlib-1.2.8;..\Thirdparty\freetype-2.6\include;..\Thirdparty\luajit\include;..\Thirdparty\luabins\include;..\Thirdparty\icu\source\common;..\Thirdparty\icu\source\i18n;..\Thirdparty\boost_1_61_0;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;NDEBUG;_WINDOWS;__WXMSW__;__WXDEBUG__;_MBCS;HUNSPELL_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;NDEBUG;_WINDOWS;__WXMSW__;__WXDEBUG__;_MBCS;HUNSPELL_STATIC;INSTRUCTIONS="AVX";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<WarningLevel>Level3</WarningLevel>
Expand Down
6 changes: 4 additions & 2 deletions Kaiplayer/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@
#define ADD_QUOTES_HELPER(s) #s
#define ADD_QUOTES(s) ADD_QUOTES_HELPER(s)



config::config()
{
wxString gitVersion;
#ifdef GIT_CUR_COMMIT
gitVersion = " " + wxString(ADD_QUOTES(GIT_BRANCH)) + " " + wxString(ADD_QUOTES(GIT_CUR_COMMIT)).Left(7);
gitVersion = L" " + wxString(ADD_QUOTES(GIT_BRANCH)) + L" " + wxString(ADD_QUOTES(GIT_CUR_COMMIT)).Left(7);
#endif
progname = _T("Kainote v") + wxString(VersionKainote) + gitVersion;
progname = L"Kainote v" + wxString(VersionKainote) + gitVersion;
#if _DEBUG
progname += " DEBUG";
#endif
Expand Down
3 changes: 2 additions & 1 deletion Kaiplayer/dshowplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,8 @@ bool DShowPlayer::OpenFile(wxString sFileName, bool vobsub)
HR(strpin.obj->QueryPinInfo(&pinfo), _("Nie można pobrać informacji o pinie splittera"));
if (FAILED(pinfo.pFilter->QueryInterface(IID_IAMStreamSelect, (void**)&stream)))
{
KaiLog(_("Błąd interfejsu wyboru ścieżek"));
//No need to inform cause it will spam on avi/wmv
//KaiLog(_("Błąd interfejsu wyboru ścieżek"));
}
}
hr = pSource->QueryInterface(IID_IAMExtendedSeeking, (void**)&chapters);
Expand Down
15 changes: 10 additions & 5 deletions Kaiplayer/kainoteMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
#define logging 5
#endif

#if !defined INSTRUCTIONS
#define INSTRUCTIONS L""
#endif

void EnableCrashingOnCrashes()
{
typedef BOOL(WINAPI *tGetPolicy)(LPDWORD lpFlags);
Expand All @@ -69,7 +73,7 @@ void EnableCrashingOnCrashes()
}

KainoteFrame::KainoteFrame(const wxPoint &pos, const wxSize &size)
: KaiFrame(0, -1, _("Bez nazwy - ") + Options.progname, pos, size, wxDEFAULT_FRAME_STYLE, "Kainote_main_window")
: KaiFrame(0, -1, _("Bez nazwy - ") + Options.progname + L" " + wxString(INSTRUCTIONS), pos, size, wxDEFAULT_FRAME_STYLE, "Kainote_main_window")
, badResolution(false)
, fc(NULL)
{
Expand Down Expand Up @@ -1397,11 +1401,12 @@ TabPanel* KainoteFrame::GetTab()
return Tabs->GetPage();
}


void KainoteFrame::Label(int iter/*=0*/, bool video/*=false*/, int wtab/*=-1*/, bool onlyTabs /*= false*/)
{
TabPanel* atab = (wtab < 0) ? GetTab() : Tabs->Page(wtab);
wxString whiter;
if (atab->Grid->IsModified()){ whiter << iter << "*"; }
if (atab->Grid->IsModified()){ whiter << iter << L"*"; }

/*MEMORYSTATUSEX statex;
statex.dwLength = sizeof (statex);
Expand All @@ -1412,8 +1417,8 @@ void KainoteFrame::Label(int iter/*=0*/, bool video/*=false*/, int wtab/*=-1*/,
wxString memtxt= wxString::Format(" RAM: %i KB / %i KB", totalmem-availmem, totalmem);*/
wxString name = (video) ? atab->VideoName : whiter + atab->SubsName;
if (!onlyTabs)
SetLabel(name + " - " + Options.progname /*+ memtxt*/);
if (name.Len()>35){ name = name.SubString(0, 35) + "..."; }
SetLabel(name + L" - " + Options.progname + L" " + wxString(INSTRUCTIONS));
if (name.Len()>35){ name = name.SubString(0, 35) + L"..."; }
Tabs->SetPageText((wtab < 0) ? Tabs->GetSelection() : wtab, name);
}

Expand Down Expand Up @@ -1604,7 +1609,7 @@ void KainoteFrame::OnPageChanged(wxCommandEvent& event)
whiter << iter << "*";
}
wxString name = (!cur->editor) ? cur->VideoName : cur->SubsName;
SetLabel(whiter + name + " - " + Options.progname);
SetLabel(whiter + name + " - " + Options.progname + L" " + wxString(INSTRUCTIONS));
if (cur->Video->GetState() != None){
SetStatusText(getfloat(cur->Video->fps) + " FPS", 4);
wxString tar;
Expand Down

0 comments on commit 7e2e363

Please sign in to comment.