Skip to content

Commit

Permalink
Add header for imageio.
Browse files Browse the repository at this point in the history
  • Loading branch information
gameblabla committed Jun 28, 2019
1 parent d099516 commit b6eabf1
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
10 changes: 10 additions & 0 deletions imageio.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#ifndef IMAGEIO_H
#define IMAGEIO_H

#include <SDL.h>
#include <png.h>
#include <assert.h>

extern SDL_Surface *loadPNG(const char* Path, uint32_t MaxWidth, uint32_t MaxHeight);

#endif
19 changes: 19 additions & 0 deletions video.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "common.h"
#define WANT_FONT_BITS
#include "font.h"
#include "imageio.h"

#ifdef PSP_BUILD

Expand Down Expand Up @@ -4219,6 +4220,24 @@ void video_resolution_small()
#endif
resolution_width = small_resolution_width;
resolution_height = small_resolution_height;

switch(current_scale){
case unscaled:
{
char name[128]={0};
SDL_Surface *loadPNG(const char* Path, uint32_t MaxWidth, uint32_t MaxHeight);
sprintf(name, "%s/border.png", main_path);
SDL_Surface* png = loadPNG(name, GCW0_SCREEN_WIDTH, GCW0_SCREEN_HEIGHT);
if(png == NULL){
printf("failed to load border png\n");
}
SDL_BlitSurface(png, NULL, rl_screen, NULL);
SDL_FreeSurface(png);
}
break;
default:
break;
}
}

void set_gba_resolution(video_scale_type scale)
Expand Down

0 comments on commit b6eabf1

Please sign in to comment.