src/main/haiku/SDL_BeApp.cc
changeset 12201 8bdc4d340419
parent 11811 5d94cb6b24d3
child 12503 806492103856
     1.1 --- a/src/main/haiku/SDL_BeApp.cc	Sat Aug 18 17:23:40 2018 -0400
     1.2 +++ b/src/main/haiku/SDL_BeApp.cc	Mon Sep 24 11:49:25 2018 -0700
     1.3 @@ -31,7 +31,7 @@
     1.4  #include <storage/File.h>
     1.5  #include <unistd.h>
     1.6  
     1.7 -#include "SDL_BApp.h"	/* SDL_BApp class definition */
     1.8 +#include "SDL_BApp.h"   /* SDL_BApp class definition */
     1.9  #include "SDL_BeApp.h"
    1.10  #include "SDL_timer.h"
    1.11  #include "SDL_error.h"
    1.12 @@ -53,24 +53,24 @@
    1.13  {
    1.14      BApplication *App;
    1.15  
    1.16 -	// default application signature
    1.17 -	const char *signature = "application/x-SDL-executable";
    1.18 -	// dig resources for correct signature
    1.19 -	image_info info;
    1.20 -	int32 cookie = 0;
    1.21 -	if (get_next_image_info(B_CURRENT_TEAM, &cookie, &info) == B_OK) {
    1.22 -		BFile f(info.name, O_RDONLY);
    1.23 -		if (f.InitCheck() == B_OK) {
    1.24 -			BAppFileInfo app_info(&f);
    1.25 -			if (app_info.InitCheck() == B_OK) {
    1.26 -				char sig[B_MIME_TYPE_LENGTH];
    1.27 -				if (app_info.GetSignature(sig) == B_OK)
    1.28 -					signature = strndup(sig, B_MIME_TYPE_LENGTH);
    1.29 -			}
    1.30 -		}
    1.31 -	}
    1.32 +    // default application signature
    1.33 +    const char *signature = "application/x-SDL-executable";
    1.34 +    // dig resources for correct signature
    1.35 +    image_info info;
    1.36 +    int32 cookie = 0;
    1.37 +    if (get_next_image_info(B_CURRENT_TEAM, &cookie, &info) == B_OK) {
    1.38 +        BFile f(info.name, O_RDONLY);
    1.39 +        if (f.InitCheck() == B_OK) {
    1.40 +            BAppFileInfo app_info(&f);
    1.41 +            if (app_info.InitCheck() == B_OK) {
    1.42 +                char sig[B_MIME_TYPE_LENGTH];
    1.43 +                if (app_info.GetSignature(sig) == B_OK)
    1.44 +                    signature = strndup(sig, B_MIME_TYPE_LENGTH);
    1.45 +            }
    1.46 +        }
    1.47 +    }
    1.48  
    1.49 -	App = new SDL_BApp(signature);
    1.50 +    App = new SDL_BApp(signature);
    1.51  
    1.52      App->Run();
    1.53      delete App;
    1.54 @@ -144,12 +144,12 @@
    1.55  
    1.56  /* SDL_BApp functions */
    1.57  void SDL_BApp::ClearID(SDL_BWin *bwin) {
    1.58 -	_SetSDLWindow(NULL, bwin->GetID());
    1.59 -	int32 i = _GetNumWindowSlots() - 1;
    1.60 -	while(i >= 0 && GetSDLWindow(i) == NULL) {
    1.61 -		_PopBackWindow();
    1.62 -		--i;
    1.63 -	}
    1.64 +    _SetSDLWindow(NULL, bwin->GetID());
    1.65 +    int32 i = _GetNumWindowSlots() - 1;
    1.66 +    while(i >= 0 && GetSDLWindow(i) == NULL) {
    1.67 +        _PopBackWindow();
    1.68 +        --i;
    1.69 +    }
    1.70  }
    1.71  
    1.72  #endif /* __HAIKU__ */