Changeset 4c71d39 in buchla-emu for emu/mid.c


Ignore:
Timestamp:
07/20/2017 11:37:13 PM (7 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
9674f1a
Parents:
ebc8f69
Message:

More granular verbosity.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • emu/mid.c

    rebc8f69 r4c71d39  
    1818#include <all.h>
    1919
    20 #define ver(...) { \
    21         if (mid_verbose) { \
    22                 SDL_LogVerbose(SDL_LOG_CATEGORY_APPLICATION, __VA_ARGS__); \
    23         } \
    24 }
     20#define ver(...) _ver(mid_verbose, 0, __VA_ARGS__)
     21#define ver2(...) _ver(mid_verbose, 1, __VA_ARGS__)
     22#define ver3(...) _ver(mid_verbose, 2, __VA_ARGS__)
    2523
    26 bool mid_verbose = false;
     24int32_t mid_verbose = 0;
    2725
    2826void mid_init(void)
     
    3836void mid_exec(void)
    3937{
    40         ver("mid exec");
     38        ver3("mid exec");
    4139}
    4240
    4341uint32_t mid_read(uint32_t off, int32_t sz)
    4442{
    45         ver("mid rd %u:%d", off, sz * 8);
     43        ver2("mid rd %u:%d", off, sz * 8);
    4644        return 0;
    4745}
     
    4947void mid_write(uint32_t off, int32_t sz, uint32_t val)
    5048{
    51         ver("mid wr %u:%d 0x%0*x", off, sz * 8, sz * 2, val);
     49        ver2("mid wr %u:%d 0x%0*x", off, sz * 8, sz * 2, val);
    5250}
Note: See TracChangeset for help on using the changeset viewer.