Skip to content

Commit

Permalink
vi.h: rename DEFAULT_CRT_MARGIN into VI_CRT_MARGIN
Browse files Browse the repository at this point in the history
  • Loading branch information
rasky committed Nov 24, 2024
1 parent d95e9c0 commit 7bf5d96
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/videoplayer/videoplayer.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ int main(void)
.aspect_ratio = (float)video_width / video_height,
// Uncomment this line if you want to have some additional black
// borders to fully display the video on real CRTs.
// .overscan_margin = DEFAULT_CRT_MARGIN,
// .overscan_margin = VI_CRT_MARGIN,
},
// 32-bit display mode is mandatory for video playback.
DEPTH_32_BPP,
Expand Down
6 changes: 3 additions & 3 deletions include/display.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ typedef struct {
/**
* @brief Add a margin to the display output to compensate for the TV overscan.
*
* Leave 0 for emulators, upscaler or LCD TVs. Use #DEFAULT_CRT_MARGIN for
* Leave 0 for emulators, upscaler or LCD TVs. Use #VI_CRT_MARGIN for
* adding some margin that will allow the picture to be fully visible on
* most TV CRTs.
*
Expand All @@ -99,7 +99,7 @@ typedef struct {
* On TV CRTs, instead, part of the picture will be displayed by the TV
* overscan. To compensate for this, you can reduce the picture size by this
* specified amount (expressed in percentage of the original picture).
* #DEFAULT_CRT_MARGIN (which is 0.05, aka 5%) is the suggested value you can
* #VI_CRT_MARGIN (which is 0.05, aka 5%) is the suggested value you can
* use for this field
*/
float overscan_margin;
Expand All @@ -121,7 +121,7 @@ typedef struct {
///@endcond

/** Good default for a safe CRT overscan margin (5%) */
#define DEFAULT_CRT_MARGIN 0.05f
#define VI_CRT_MARGIN 0.05f

/** @brief 256x240 mode, stretched to 4:3, no borders */
const resolution_t RESOLUTION_256x240 = {.width = 256, .height = 240, .interlaced = INTERLACE_OFF};
Expand Down
6 changes: 3 additions & 3 deletions src/vi.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
* on all the four edges, you will get a 616x456 display output, plus
* the requested 12 dots of borders on all sides; the actual display output
* will thus be smaller, and possibly get fully out of overscan. The value
* #DEFAULT_CRT_MARGIN is a good default you can use for overscan compensation on
* #VI_CRT_MARGIN is a good default you can use for overscan compensation on
* most CRT TVs.
*
* Notice that adding borders also affect the aspect ratio of the display output;
Expand Down Expand Up @@ -421,7 +421,7 @@ typedef struct vi_borders_s {
*
* The margin is expressed as a percentage relative to the virtual VI display
* output (640x480). A good default for this margin for most CRTs is
* #DEFAULT_CRT_MARGIN (5%).
* #VI_CRT_MARGIN (5%).
*
* For instance, to create a 16:9 resolution, you can do:
*
Expand All @@ -433,7 +433,7 @@ typedef struct vi_borders_s {
* @param aspect_ratio Target aspect ratio
* @param overscan_margin Margin to add to compensate for TV overscan. Use 0
* to use full picture (eg: for emulators), and something
* like #DEFAULT_CRT_MARGIN to get a good CRT default.
* like #VI_CRT_MARGIN to get a good CRT default.
*
* @return vi_borders_t The requested border settings
*/
Expand Down

0 comments on commit 7bf5d96

Please sign in to comment.