OfficialIncubo / BeatDrop-Music-Visualizer

The Milkdrop2 Music Visualization Standalone, only for Windows
https://twitter.com/BeatDropVis
Other
44 stars 2 forks source link

Showing an actual preset name in the Window Title #12

Closed OfficialIncubo closed 1 year ago

OfficialIncubo commented 1 year ago

It's a great feature that it shows a preset info on title, like projectM!

Here is the code that actually implemented:

        case VK_F2:

            ShowPresetOnTitle = !ShowPresetOnTitle;
            if (ShowPresetOnTitle)
            {
                while (true)
                {
                    SetWindowText(hWnd, "BeatDrop Music Visualizer - (m_nLoadingPreset != 0) ? m_pNewState->m_szDesc : m_pState->m_szDesc");
                    Sleep(100);
                }
                wsprintfW(m_szSongTitle, L"Show Preset Name on Window Title ON"); LaunchSongTitleAnim();
            }
            else
            {
                SetWindowText(hWnd, "BeatDrop Music Visualizer");
                wsprintfW(m_szSongTitle, L"Show Preset Name on Window Title OFF"); LaunchSongTitleAnim();
            }
        return 0;

I pressed F2 and it changed the title to "BeatDrop Music Visualizer - (m_nLoadingPreset != 0) ? m_pNewState->m_szDesc : m_pState->m_szDesc")". ...and the while statement freezes BeatDrop for no reason at all.

I would like to see this preset info on window title correctly, like "BeatDrop Music Visualizer - martin - colorwall" or "BeatDrop Music Visualizer ⫸ Geiss - Blur Mix 3".

milkdrop2077 commented 1 year ago

just use SetWindowText one time when loading a preset, don't use a while

OfficialIncubo commented 1 year ago

Yeah. I will remove the while statement cuz the loading preset expression is here. I want to see the correct preset info in title, not "BeatDrop Music Visualizer - (m_nLoadingPreset != 0) ? m_pNewState->m_szDesc : m_pState->m_szDesc")".

OfficialIncubo commented 1 year ago

just use SetWindowText one time when loading a preset, don't use a while

@milkdrop2077, That showed me like that ._. image

...and BeatDrop didn't freeze if I removed the while statement!

OfficialIncubo commented 1 year ago

The implementation was almost done, but @milkdrop2077 said that 'F4 is enough'. Because of this, I don't want to implement it.