mirror of
				https://github.com/Clortox/dashboard.git
				synced 2025-07-17 14:02:10 +00:00 
			
		
		
		
	Fix bug with const resource loading
This commit is contained in:
		
							parent
							
								
									8d8751e4d8
								
							
						
					
					
						commit
						076b905c72
					
				@ -368,6 +368,7 @@ void board::start(){
 | 
				
			|||||||
        SDL_RenderClear(_renderer);
 | 
					        SDL_RenderClear(_renderer);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //PLACEHOLDER, cycle color
 | 
					        //PLACEHOLDER, cycle color
 | 
				
			||||||
 | 
					        /*
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            static uint8_t green = 0;
 | 
					            static uint8_t green = 0;
 | 
				
			||||||
            static bool up = true;
 | 
					            static bool up = true;
 | 
				
			||||||
@ -387,6 +388,7 @@ void board::start(){
 | 
				
			|||||||
                green --;
 | 
					                green --;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        */
 | 
				
			||||||
        //END PLACEHOLDER
 | 
					        //END PLACEHOLDER
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -428,11 +430,11 @@ void board::initConstResources(){
 | 
				
			|||||||
    for(unsigned int i = 0; 
 | 
					    for(unsigned int i = 0; 
 | 
				
			||||||
            i < IMAGE_LOCATIONS_LENGTH; ++i){
 | 
					            i < IMAGE_LOCATIONS_LENGTH; ++i){
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        SDL_Texture_Wrapper tw(fullPath + IMAGE_LOCATIONS[0]);
 | 
					        SDL_Texture_Wrapper tw(fullPath + IMAGE_LOCATIONS[i]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        SDL_Log("Loaded image %s at memory location %p\n",
 | 
					        SDL_Log("Loaded image %s at memory location %p\n",
 | 
				
			||||||
                IMAGE_LOCATIONS[i],
 | 
					                IMAGE_LOCATIONS[i],
 | 
				
			||||||
                setImage(IMAGE_LOCATIONS[0],
 | 
					                setImage(IMAGE_LOCATIONS[i],
 | 
				
			||||||
                    tw));
 | 
					                    tw));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    SDL_Log("Loaded static images into working memory\n");
 | 
					    SDL_Log("Loaded static images into working memory\n");
 | 
				
			||||||
@ -446,8 +448,8 @@ void board::initConstResources(){
 | 
				
			|||||||
    for(unsigned int i = 0;
 | 
					    for(unsigned int i = 0;
 | 
				
			||||||
            i < FONT_LOCATIONS_LENGTH; ++i){
 | 
					            i < FONT_LOCATIONS_LENGTH; ++i){
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        SDL_Font_Wrapper fw(fullPath + FONT_LOCATIONS[0]._name, 
 | 
					        SDL_Font_Wrapper fw(fullPath + FONT_LOCATIONS[i]._name, 
 | 
				
			||||||
                FONT_LOCATIONS[0]._size);
 | 
					                FONT_LOCATIONS[i]._size);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        SDL_Log("Loaded font %s %lu at memory location %p\n",
 | 
					        SDL_Log("Loaded font %s %lu at memory location %p\n",
 | 
				
			||||||
                FONT_LOCATIONS[i]._name,
 | 
					                FONT_LOCATIONS[i]._name,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user