Skip to content

Commit

Permalink
fix sa
Browse files Browse the repository at this point in the history
  • Loading branch information
finger563 committed Dec 28, 2023
1 parent a7daa47 commit 38c7ea8
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 11 deletions.
11 changes: 4 additions & 7 deletions components/nes/src/video_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ static void set_palette(rgb_t *pal);
static void clear(uint8 color);
static bitmap_t *lock_write(void);
static void free_write(int num_dirties, rect_t *dirty_rects);
static void custom_blit(bitmap_t *bmp, int num_dirties, rect_t *dirty_rects);
static void custom_blit(const bitmap_t *bmp, int num_dirties, rect_t *dirty_rects);

QueueHandle_t vidQueue;

Expand All @@ -134,7 +134,7 @@ viddriver_t sdlDriver =
clear, /* clear */
lock_write, /* lock_write */
free_write, /* free_write */
custom_blit, /* custom_blit */
(void (*)(bitmap_t *, int, rect_t *))custom_blit, /* custom_blit */
false /* invalidate flag */
};

Expand Down Expand Up @@ -283,7 +283,7 @@ static void free_write(int num_dirties, rect_t *dirty_rects)
bmp_destroy(&myBitmap);
}

static void custom_blit(bitmap_t *bmp, int num_dirties, rect_t *dirty_rects) {
static void custom_blit(const bitmap_t *bmp, int num_dirties, rect_t *dirty_rects) {
uint8_t *lcdfb = get_frame_buffer0();
if (bmp->line[0] != NULL)
{
Expand Down Expand Up @@ -448,10 +448,7 @@ int osd_init()
{
log_chain_logfunc(logprint);

if (osd_init_sound())
{
abort();
}
osd_init_sound();

vidQueue=xQueueCreate(1, sizeof(bitmap_t *));
xTaskCreatePinnedToCore(&videoTask, "videoTask", 6*1024, NULL, 20, NULL, 1);
Expand Down
1 change: 0 additions & 1 deletion main/cart.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class Cart {
// copy the romdata
rom_size_bytes_ = copy_romdata_to_cart_partition(get_rom_filename());
romdata_ = get_mmapped_romdata();
handle_video_setting();
// create the menu
menu_ = std::make_unique<Menu>(Menu::Config{
.display = display_,
Expand Down
1 change: 1 addition & 0 deletions main/gbc_cart.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class GbcCart : public Cart {

explicit GbcCart(const Cart::Config& config)
: Cart(config) {
handle_video_setting();
init();
}

Expand Down
4 changes: 1 addition & 3 deletions main/nes_cart.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class NesCart : public Cart {

explicit NesCart(const Cart::Config& config)
: Cart(config) {
handle_video_setting();
init();
}

Expand Down Expand Up @@ -98,21 +99,18 @@ class NesCart : public Cart {
#endif
}

// cppcheck-suppress uselessOverride
virtual void set_original_video_setting() override {
#if defined(ENABLE_NES)
set_nes_video_original();
#endif
}

// cppcheck-suppress uselessOverride
virtual void set_fit_video_setting() override {
#if defined(ENABLE_NES)
set_nes_video_fit();
#endif
}

// cppcheck-suppress uselessOverride
virtual void set_fill_video_setting() override {
#if defined(ENABLE_NES)
set_nes_video_fill();
Expand Down
1 change: 1 addition & 0 deletions main/sms_cart.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class SmsCart : public Cart {

explicit SmsCart(const Cart::Config& config)
: Cart(config) {
handle_video_setting();
init();
}

Expand Down

0 comments on commit 38c7ea8

Please sign in to comment.