mirror of
https://github.com/mpv-player/mpv
synced 2024-12-12 09:56:30 +00:00
move variable declaration at beginning of block
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13720 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
5cda6fffa5
commit
159928a38a
@ -250,9 +250,11 @@ static OSStatus MainWindowEventHandler(EventHandlerCallRef nextHandler, EventRef
|
|||||||
case kEventMouseDown:
|
case kEventMouseDown:
|
||||||
{
|
{
|
||||||
EventMouseButton button;
|
EventMouseButton button;
|
||||||
|
short part;
|
||||||
|
|
||||||
GetEventParameter(event, kEventParamMouseButton, typeMouseButton, 0, sizeof(EventMouseButton), 0, &button);
|
GetEventParameter(event, kEventParamMouseButton, typeMouseButton, 0, sizeof(EventMouseButton), 0, &button);
|
||||||
|
|
||||||
short part = FindWindow(mousePos,&tmpWin);
|
part = FindWindow(mousePos,&tmpWin);
|
||||||
|
|
||||||
if(part == inMenuBar)
|
if(part == inMenuBar)
|
||||||
{
|
{
|
||||||
@ -276,9 +278,11 @@ static OSStatus MainWindowEventHandler(EventHandlerCallRef nextHandler, EventRef
|
|||||||
case kEventMouseWheelMoved:
|
case kEventMouseWheelMoved:
|
||||||
{
|
{
|
||||||
int wheel;
|
int wheel;
|
||||||
|
short part;
|
||||||
|
|
||||||
GetEventParameter(event, kEventParamMouseWheelDelta, typeSInt32, 0, sizeof(int), 0, &wheel);
|
GetEventParameter(event, kEventParamMouseWheelDelta, typeSInt32, 0, sizeof(int), 0, &wheel);
|
||||||
|
|
||||||
short part = FindWindow(mousePos,&tmpWin);
|
part = FindWindow(mousePos,&tmpWin);
|
||||||
|
|
||||||
if(part == inContent)
|
if(part == inContent)
|
||||||
{
|
{
|
||||||
@ -301,13 +305,13 @@ static OSStatus MainWindowEventHandler(EventHandlerCallRef nextHandler, EventRef
|
|||||||
static OSStatus MainWindowCommandHandler(EventHandlerCallRef nextHandler, EventRef event, void *userData)
|
static OSStatus MainWindowCommandHandler(EventHandlerCallRef nextHandler, EventRef event, void *userData)
|
||||||
{
|
{
|
||||||
OSStatus result = noErr;
|
OSStatus result = noErr;
|
||||||
|
UInt32_t d_width;
|
||||||
|
UInt32_t d_height;
|
||||||
UInt32 class = GetEventClass (event);
|
UInt32 class = GetEventClass (event);
|
||||||
UInt32 kind = GetEventKind (event);
|
UInt32 kind = GetEventKind (event);
|
||||||
|
|
||||||
result = CallNextEventHandler(nextHandler, event);
|
result = CallNextEventHandler(nextHandler, event);
|
||||||
|
|
||||||
uint32_t d_width;
|
|
||||||
uint32_t d_height;
|
|
||||||
aspect(&d_width,&d_height,A_NOZOOM);
|
aspect(&d_width,&d_height,A_NOZOOM);
|
||||||
|
|
||||||
if(class == kEventClassCommand)
|
if(class == kEventClassCommand)
|
||||||
@ -462,9 +466,10 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, uint32
|
|||||||
WindowAttributes windowAttrs;
|
WindowAttributes windowAttrs;
|
||||||
GDHandle deviceHdl;
|
GDHandle deviceHdl;
|
||||||
OSErr qterr;
|
OSErr qterr;
|
||||||
|
int i;
|
||||||
|
|
||||||
//Get Main device info///////////////////////////////////////////////////
|
//Get Main device info///////////////////////////////////////////////////
|
||||||
int i;
|
|
||||||
|
|
||||||
deviceHdl = GetMainDevice();
|
deviceHdl = GetMainDevice();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user