git @ Cat's Eye Technologies linapple / 1fd2da8
Added loading from users home install directory (/home/<user>/linapple); linapple no longer needs to be run from the directory holding its files. ghedger 4 years ago
2 changed file(s) with 17 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
4343 #include <sys/types.h>
4444 #include <sys/stat.h>
4545 #include <fcntl.h>
46
47 #include "config.h"
4648
4749 //char VERSIONSTRING[] = "xx.yy.zz.ww";
4850
768770
769771 int main(int argc, char * lpCmdLine[])
770772 {
773 // GPH: The very first thing we do is attempt to grab the needed configuration files and put them in the user's folder.
774 Config config;
775 config.ValidateUserDirectory();
776 config.ChangeToUserDirectory();
777
778
771779 // reading FullScreen and Boot from conf file?
772780 // bool bSetFullScreen = false;
773781 // bool bBoot = false;
2929
3030 #include "stdafx.h"
3131 #include "wwrapper.h"
32 #include "config.h"
33 #include <iostream>
3234 //#include "stretch.c" // for SDL_SoftStretch thanx to Sam Lantinga and Tomasz Cejner
3335
3436 //#include "..\resource\resource.h"
18821884
18831885 //===========================================================================
18841886 void VideoInitialize () {
1887 Config config;
1888 config.ChangeToUserDirectory();
1889
1890
18851891 SDL_Surface * tmp_surface;
18861892 // CREATE A BUFFER FOR AN IMAGE OF THE LAST DRAWN MEMORY
18871893 vidlastmem = (LPBYTE)VirtualAlloc(NULL,0x10000,MEM_COMMIT,PAGE_READWRITE);
18881894 ZeroMemory(vidlastmem,0x10000);
18891895
1896 printf( "%s\n", (config.GetUserFilePath() + "splash.bmp").c_str());
1897
18901898 // LOAD THE splash screen
1891 tmp_surface = SDL_LoadBMP("splash.bmp");
1899 tmp_surface = SDL_LoadBMP((config.GetUserFilePath() + "splash.bmp").c_str());
18921900 if (tmp_surface != NULL) g_hLogoBitmap = SDL_DisplayFormat(tmp_surface);
18931901 else fprintf(stderr, "Video: splash.bmp was not loaded\n");
18941902 SDL_FreeSurface(tmp_surface);