Skip to content

Commit

Permalink
Add option to enable experimental features
Browse files Browse the repository at this point in the history
With this, I can release without modifying things specially on the release
branch.
  • Loading branch information
any1 committed Feb 25, 2024
1 parent dedac2f commit c22a0c0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,13 @@ if enable_websocket
config.set('ENABLE_WEBSOCKET', true)
endif

if get_option('experimental')
if buildtype == 'release'
warning('Experimental features enabled in release build')
endif
config.set('ENABLE_EXPERIMENTAL', true)
endif

configure_file(
output: 'config.h',
configuration: config,
Expand Down
1 change: 1 addition & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ option('nettle', type: 'feature', value: 'auto', description: 'Enable nettle low
option('systemtap', type: 'boolean', value: false, description: 'Enable tracing using sdt')
option('gbm', type: 'feature', value: 'auto', description: 'Enable GBM integration')
option('h264', type: 'feature', value: 'auto', description: 'Enable open h264 encoding')
option('experimental', type: 'boolean', value: false, description: 'Enable experimental features')
7 changes: 7 additions & 0 deletions src/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -1025,9 +1025,16 @@ static int on_client_set_encodings(struct nvnc_client* client)
case RFB_ENCODING_DESKTOPSIZE:
case RFB_ENCODING_EXTENDEDDESKTOPSIZE:
case RFB_ENCODING_QEMU_EXT_KEY_EVENT:
#ifdef ENABLE_EXPERIMENTAL
case RFB_ENCODING_PTS:
case RFB_ENCODING_NTP:
#endif
client->encodings[n++] = encoding;
#ifndef ENABLE_EXPERIMENTAL
case RFB_ENCODING_PTS:
case RFB_ENCODING_NTP:
;
#endif
}

if (RFB_ENCODING_JPEG_LOWQ <= encoding &&
Expand Down

0 comments on commit c22a0c0

Please sign in to comment.