Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.8 KiB

  1. //=============================================================================
  2. //
  3. // Copyright (C) 1997 Microsoft Corporation. All rights reserved.
  4. //
  5. // File: modenot.c
  6. // Content: 16-bit display mode change notification handling
  7. //
  8. // Date By Reason
  9. // ---------- -------- -----------------------------------------------------
  10. // 08/27/1997 johnstep Initial implementation
  11. //
  12. //=============================================================================
  13. #include "ddraw16.h"
  14. #define MODECHANGE_BEGIN 1
  15. #define MODECHANGE_END 2
  16. #define MODECHANGE_ENABLE 3
  17. #define MODECHANGE_DISABLE 4
  18. //=============================================================================
  19. //
  20. // Function: ModeChangeNotify
  21. //
  22. // This exported function is called by name by User for display mode changes,
  23. // including enabling and disabling the display.
  24. //
  25. // Parameters:
  26. //
  27. // UINT code [IN] - one of the following values:
  28. // MODECHANGE_BEGIN
  29. // MODECHANGE_END
  30. // MODECHANGE_ENABLE
  31. // MODECHANGE_DISABLE
  32. //
  33. // LPDEVMODE pdm [IN] - includes the name of the display device
  34. //
  35. // DWORD flags [IN] - CDS flags
  36. //
  37. // Return:
  38. //
  39. // FALSE to prevent display settings to change
  40. //
  41. //=============================================================================
  42. BOOL WINAPI _loadds ModeChangeNotify(UINT code, LPDEVMODE pdm, DWORD flags)
  43. {
  44. extern BOOL DDAPI DD32_HandleExternalModeChange(LPDEVMODE pdm);
  45. DPF(9, "ModeChangeNotify: %d (Device: %s)", code, pdm->dmDeviceName);
  46. switch (code)
  47. {
  48. case MODECHANGE_BEGIN:
  49. case MODECHANGE_DISABLE:
  50. return DD32_HandleExternalModeChange(pdm);
  51. break;
  52. }
  53. return TRUE;
  54. }