示例#1
0
文件: run.cpp 项目: carstene1ns/fbagx
static int RunExit()
{
	nNormalLast = 0;
	// Stop sound if it was playing
	AudSoundStop();
	return 0;
}
示例#2
0
// Show a message box with an error message
int AppError(char *szText,int bWarning)
{
	AudSoundStop();
	MessageBox(hScrnWnd,szText,
	           bWarning ? APP_TITLE " Warning" :  APP_TITLE " Error",
	           MB_OK | (bWarning?MB_ICONWARNING:MB_ICONERROR)
	          );
	AudSoundPlay();
	return 0;
}
示例#3
0
文件: media.cpp 项目: ernestd/fbarr
void MediaChangeFps(int scale)
{
	nAppVirtualFps = nBaseFps * scale / 100;

	if (bAudOkay) {
		if (bAudPlaying) {
			AudSoundStop();
		}

		if (AudSoundSetFps()) {
			return;
		}

		nBurnSoundRate = nAudSampleRate[0];
		nBurnSoundLen = nAudSegLen;

		AudSoundPlay();
	}
}
示例#4
0
文件: mdi.cpp 项目: EastonWoo/libafba
// MOUSE MOVE (DRAG)
static int OnMouseMove(HWND /*hwnd*/, int /*x*/, int /*y*/, UINT keyIndicators)
{
	if(bDrag && keyIndicators == MK_LBUTTON &&  !nVidFullscreen && !bMenuEnabled) 
	{
		AudSoundStop();

		// If UxThemes are active (Windows XP+) or DWM Composition is active
		if(GetThemeStatus() || IsCompositeOn()) {
			// Redraw everything on the MDI frame to get accurate calculatations
			RedrawWindow(hWndChildFrame, NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW | RDW_ALLCHILDREN);
		}

		POINT pointer;
		memset(&pointer, 0, sizeof(POINT));
        
		GetCursorPos(&pointer);
		
		nMoveX = pointer.x;
		nMoveY = pointer.y;

		// negative (left / up) [-]
		if((nMoveX < nDownX && nMoveX != 0) || (nMoveY < nDownY && nMoveY != 0)) {
			nWindowPosX = nOldWindowX - (int)(nDownX - nMoveX);
			nWindowPosY = nOldWindowY - (int)(nDownY - nMoveY);	
			SetWindowPos(hScrnWnd, NULL, nWindowPosX, nWindowPosY, 0, 0, SWP_NOREPOSITION | SWP_NOSIZE);
		}

		// positive (right / down) [+]
		if((nMoveX > nDownX && nMoveX != 0) || (nMoveY > nDownY && nMoveY != 0)) {
			nWindowPosX = nOldWindowX + (int)(nMoveX - nDownX);
			nWindowPosY = nOldWindowY + (int)(nMoveY - nDownY);	
			SetWindowPos(hScrnWnd, NULL, nWindowPosX, nWindowPosY, 0, 0, SWP_NOREPOSITION | SWP_NOSIZE);
		}

		AudSoundPlay();
		return 0;
	}
	return 1;
}