tied resource initialization into the main control flow
This commit is contained in:
		
							parent
							
								
									751c0674d1
								
							
						
					
					
						commit
						9348673adb
					
				@ -25,6 +25,7 @@
 | 
			
		||||
#include "config.h"
 | 
			
		||||
#include "gpio.h"
 | 
			
		||||
#include "fbinit.h"
 | 
			
		||||
#include "resources.h"
 | 
			
		||||
#include "fontengine.h"
 | 
			
		||||
#include "time_func.h"
 | 
			
		||||
#include "ep_init.h"
 | 
			
		||||
@ -41,6 +42,8 @@ int main(int argc, char *argv[])
 | 
			
		||||
    return EXIT_FAILURE;
 | 
			
		||||
  else if (hr != S_OK)
 | 
			
		||||
    return EXIT_SUCCESS;
 | 
			
		||||
  if (FAILED(Rsrc_setup()))
 | 
			
		||||
    return EXIT_FAILURE;
 | 
			
		||||
  if (FAILED(Fb_setup()))
 | 
			
		||||
    return EXIT_FAILURE;
 | 
			
		||||
  if (FAILED(FontEng_setup()))
 | 
			
		||||
 | 
			
		||||
@ -61,7 +61,7 @@ static void rsrc_cleanup(void)
 | 
			
		||||
  sysresource = NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
HRESULT Rsrc_init(void)
 | 
			
		||||
HRESULT Rsrc_setup(void)
 | 
			
		||||
{
 | 
			
		||||
  HRESULT hr = S_OK;
 | 
			
		||||
  zip_source_t *syssource;
 | 
			
		||||
 | 
			
		||||
@ -27,6 +27,6 @@ typedef HANDLE HRSRC;       /* handle to resource */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
extern HRESULT Rsrc_init(void);
 | 
			
		||||
extern HRESULT Rsrc_setup(void);
 | 
			
		||||
 | 
			
		||||
#endif /* __RESOURCES_H_INCLUDED */
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user