TEXT   33

moonlight patch

Guest on 16th June 2022 05:10:52 AM

  1. diff --git a/CMakeLists.txt b/CMakeLists.txt
  2. index a459e06..9aa8895 100644
  3. --- a/CMakeLists.txt
  4. +++ b/CMakeLists.txt
  5. @@ -1,5 +1,5 @@
  6.  project(moonlight-embedded C)
  7. -cmake_minimum_required(VERSION 3.1)
  8. +cmake_minimum_required(VERSION 2.8)
  9.  SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
  10.  include(${CMAKE_ROOT}/Modules/GNUInstallDirs.cmake)
  11.  
  12. @@ -32,11 +32,11 @@ pkg_check_modules(PULSE libpulse-simple)
  13.  
  14.  if(AVCODEC_FOUND AND AVUTIL_FOUND AND SWSCALE_FOUND AND SDL_FOUND)
  15.    set(SOFTWARE_FOUND TRUE)
  16. -  if(XLIB_FOUND AND LIBVA_FOUND)
  17. -    set(VDPAU_FOUND TRUE)
  18. -  else()
  19. +#  if(XLIB_FOUND AND LIBVA_FOUND)
  20. +#    set(VDPAU_FOUND TRUE)
  21. +#  else()
  22.      set(VDPAU_FOUND FALSE)
  23. -  endif()
  24. +#  endif()
  25.  else()
  26.    set(SOFTWARE_FOUND FALSE)
  27.  endif()
  28. @@ -84,7 +84,7 @@ add_subdirectory(libgamestream)
  29.  
  30.  add_executable(moonlight ${SRC_LIST})
  31.  target_link_libraries(moonlight gamestream)
  32. -set_property(TARGET moonlight PROPERTY C_STANDARD 99)
  33. +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
  34.  
  35.  if (CEC_FOUND AND CEC_VERSION_COMPATIBLE)
  36.    list(APPEND MOONLIGHT_DEFINITIONS HAVE_LIBCEC)
  37. @@ -98,7 +98,7 @@ if(BROADCOM_FOUND)
  38.    list(APPEND MOONLIGHT_OPTIONS PI)
  39.    aux_source_directory(./third_party/ilclient ILCLIENT_SRC_LIST)
  40.    add_library(moonlight-pi SHARED ./src/video/pi.c ${ILCLIENT_SRC_LIST})
  41. -  target_include_directories(moonlight-pi PRIVATE ./third_party/ilclient ${BROADCOM_INCLUDE_DIRS} ${GAMESTREAM_INCLUDE_DIR} ${MOONLIGHT_COMMON_INCLUDE_DIR})
  42. +  include_directories(./third_party/ilclient ${BROADCOM_INCLUDE_DIRS})
  43.    target_link_libraries(moonlight-pi gamestream ${BROADCOM_LIBRARIES})
  44.    set_property(TARGET moonlight-pi PROPERTY COMPILE_DEFINITIONS ${BROADCOM_DEFINITIONS})
  45.    install(TARGETS moonlight-pi DESTINATION ${CMAKE_INSTALL_LIBDIR})
  46. diff --git a/debian/changelog b/debian/changelog
  47. index a65b575..1e19229 100644
  48. --- a/debian/changelog
  49. +++ b/debian/changelog
  50. @@ -1,4 +1,4 @@
  51. -moonlight-embedded (2.1.2-1) RELEASED; urgency=high
  52. +moonlight-embedded (2.1.2-2) RELEASED; urgency=high
  53.  
  54.    * Update to version 2.1.2
  55.  
  56. diff --git a/debian/control b/debian/control
  57. index 4c67df4..d9f7a1c 100644
  58. --- a/debian/control
  59. +++ b/debian/control
  60. @@ -2,13 +2,13 @@ Source: moonlight-embedded
  61.  Section: games
  62.  Priority: extra
  63.  Maintainer: Iwan Timmer <irtimmer@gmail.com>
  64. -Build-Depends: debhelper (>= 8.0.0), cmake, libopus-dev, libexpat1-dev, libasound2-dev, libudev-dev, libavahi-client-dev, libcurl4-openssl-dev, libevdev-dev, libraspberrypi-dev | rbp-userland-dev-osmc
  65. +Build-Depends: debhelper (>= 8.0.0), cmake, libopus-dev, libexpat1-dev, libasound2-dev, libudev-dev, libavahi-client-dev, libcurl4-openssl-dev, libevdev-dev
  66.  Standards-Version: 3.9.3
  67.  Homepage: https://github.com/irtimmer/moonlight-embedded
  68.  
  69.  Package: moonlight-embedded
  70.  Architecture: armhf
  71. -Depends: libraspberrypi0 | rbp-userland-osmc, ${shlibs:Depends}, ${misc:Depends}
  72. +Depends: ${shlibs:Depends}, ${misc:Depends}
  73.  Recommends: alsa-base
  74.  Suggests: alsa-utils
  75.  Description: GameStream client for Linux
  76. diff --git a/debian/rules b/debian/rules
  77. index 16fe403..d92ed13 100755
  78. --- a/debian/rules
  79. +++ b/debian/rules
  80. @@ -1,6 +1,6 @@
  81.  #!/usr/bin/make -f
  82.  # Uncomment this to turn on verbose mode.
  83. -#export DH_VERBOSE=1
  84. +export DH_VERBOSE=1
  85.  
  86.  %:
  87. -       dh $@ --with quilt
  88. +       dh $@
  89. diff --git a/libgamestream/CMakeLists.txt b/libgamestream/CMakeLists.txt
  90. index fea8e5d..40237df 100644
  91. --- a/libgamestream/CMakeLists.txt
  92. +++ b/libgamestream/CMakeLists.txt
  93. @@ -14,13 +14,13 @@ aux_source_directory(../third_party/moonlight-common-c/limelight-common/OpenAES
  94.  add_library(moonlight-common SHARED ${MOONLIGHT_COMMON_SRC_LIST})
  95.  
  96.  add_library(gamestream SHARED ${GAMESTREAM_SRC_LIST})
  97. -set_property(TARGET gamestream PROPERTY C_STANDARD 99)
  98. +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
  99.  target_link_libraries(gamestream moonlight-common)
  100.  
  101.  set_target_properties(gamestream PROPERTIES SOVERSION 0 VERSION ${MOONLIGHT_VERSION})
  102.  set_target_properties(moonlight-common PROPERTIES SOVERSION 0 VERSION ${MOONLIGHT_VERSION})
  103.  
  104. -target_include_directories(gamestream PRIVATE ../third_party/moonlight-common-c ../third_party/h264bitstream ${AVAHI_INCLUDE_DIRS})
  105. +include_directories(../third_party/h264bitstream ../third_party/moonlight-common-c ${AVAHI_INCLUDE_DIRS})
  106.  target_link_libraries(gamestream ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES} ${EXPAT_LIBRARIES} ${AVAHI_LIBRARIES})
  107.  
  108.  target_link_libraries(gamestream ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS})
  109. diff --git a/src/sdl.c b/src/sdl.c
  110. index b48999e..844e1c6 100644
  111. --- a/src/sdl.c
  112. +++ b/src/sdl.c
  113. @@ -39,7 +39,7 @@ void sdl_init(int width, int height, bool fullscreen) {
  114.      exit(1);
  115.    }
  116.  
  117. -  fullscreen_flags = fullscreen?SDL_WINDOW_FULLSCREEN:0;
  118. +  fullscreen_flags = fullscreen?SDL_WINDOW_FULLSCREEN_DESKTOP:0;
  119.    window = SDL_CreateWindow("Moonlight", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, height, SDL_WINDOW_OPENGL | fullscreen_flags);
  120.    if(!window) {
  121.      fprintf(stderr, "SDL: could not create window - exiting\n");
  122. @@ -53,6 +53,10 @@ void sdl_init(int width, int height, bool fullscreen) {
  123.      exit(1);
  124.    }
  125.  
  126. +  SDL_RendererInfo info;
  127. +  SDL_GetRendererInfo(renderer,&info);
  128. +  fprintf(stdout, "Renderer = %s\n",info.name);
  129. +
  130.    bmp = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_YV12, SDL_TEXTUREACCESS_STREAMING, width, height);
  131.    if (!bmp) {
  132.      fprintf(stderr, "SDL: could not create texture - exiting\n");
  133. @@ -65,7 +69,6 @@ void sdl_init(int width, int height, bool fullscreen) {
  134.      exit(1);
  135.    }
  136.  
  137. -
  138.    sdlinput_init();
  139.  }
  140.  
  141. @@ -77,7 +80,7 @@ void sdl_loop() {
  142.        done = true;
  143.        break;
  144.      case SDL_TOGGLE_FULLSCREEN:
  145. -      fullscreen_flags ^= SDL_WINDOW_FULLSCREEN;
  146. +      fullscreen_flags ^= SDL_WINDOW_FULLSCREEN_DESKTOP;
  147.        SDL_SetWindowFullscreen(window, fullscreen_flags);
  148.      case SDL_MOUSE_GRAB:
  149.        SDL_SetRelativeMouseMode(SDL_TRUE);

Raw Paste


Login or Register to edit or fork this paste. It's free.