| 2658 | } |
| 2659 | |
| 2660 | BOOL CMainFrame::OnCopyData(CWnd* pWnd, COPYDATASTRUCT* pCopyDataStruct) |
| 2661 | { |
| 2662 | auto fileName = (LPCWSTR)pCopyDataStruct->lpData; // // // |
| 2663 | bool hasFile = fileName && fileName[0] != L'\0'; // // // |
| 2664 | |
| 2665 | switch (pCopyDataStruct->dwData) { |
| 2666 | case value_cast(ipc_command_t::load): |
| 2667 | // Load file |
| 2668 | if (hasFile) |
| 2669 | FTEnv.GetMainApp()->OpenDocumentFile(fileName); // // // |
| 2670 | return TRUE; |
| 2671 | case value_cast(ipc_command_t::load_play): |
| 2672 | // Load file |
| 2673 | if (hasFile) |
| 2674 | FTEnv.GetMainApp()->OpenDocumentFile(fileName); |
| 2675 | // and play |
| 2676 | if (CFamiTrackerDoc::GetDoc()->IsFileLoaded() && |
| 2677 | !CFamiTrackerDoc::GetDoc()->HasLastLoadFailed()) |
| 2678 | FTEnv.GetSoundGenerator()->StartPlayer(GetPlayerCursor(play_mode_t::Song)); // // // |
| 2679 | return TRUE; |
| 2680 | } |
| 2681 | |
| 2682 | return CFrameWnd::OnCopyData(pWnd, pCopyDataStruct); |
| 2683 | } |
| 2684 | |
| 2685 | bool CMainFrame::AddAction(std::unique_ptr<CAction> pAction) // // // |
| 2686 | { |
nothing calls this directly
no test coverage detected