Skip to content

Commit 349abe5

Browse files
committed
minor update to nes to make some variables static const
1 parent 76a3e94 commit 349abe5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/nes/src/video_audio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ void osd_set_video_scale(bool new_video_scale) {
150150

151151
void ili9341_write_frame_nes(const uint8_t* buffer, uint16_t* myPalette) {
152152
short x, y;
153-
int x_offset = (320-256)/2;
154-
int y_offset = (240-224)/2;
153+
static const int x_offset = (320-256)/2;
154+
static const int y_offset = (240-224)/2;
155155
if (buffer == NULL) {
156156
// clear the buffer, clear the screen
157157
lcd_write_frame(0+x_offset, 0+y_offset, NES_GAME_WIDTH-1, NES_GAME_HEIGHT-1, NULL);

0 commit comments

Comments
 (0)