Diff for /np2/win9x/subwind.cpp between versions 1.3 and 1.6

version 1.3, 2004/03/25 15:22:43 version 1.6, 2004/04/07 13:15:40
Line 437  static const INITBL np2skini[] = { Line 437  static const INITBL np2skini[] = {
         {"WindposY", INITYPE_SINT32,    &skbdcfg.posy,                  0},          {"WindposY", INITYPE_SINT32,    &skbdcfg.posy,                  0},
         {"windtype", INITYPE_BOOL,              &skbdcfg.type,                  0}};          {"windtype", INITYPE_BOOL,              &skbdcfg.type,                  0}};
   
 static void skpalcnv(CMNPAL *dst, RGB32 *src, UINT pals, UINT bpp) {  static void skpalcnv(CMNPAL *dst, const RGB32 *src, UINT pals, UINT bpp) {
   
         UINT    i;          UINT    i;
   
         switch(bpp) {          switch(bpp) {
   #if defined(SUPPORT_8BPP)
                   case 8:
                           break;
   #endif
   #if defined(SUPPORT_16BPP)
                 case 16:                  case 16:
                         for (i=0; i<pals; i++) {                          for (i=0; i<pals; i++) {
                                 dst[i].pal16 = dd2_get16pal(skbdwin.dd2hdl, src[i]);                                  dst[i].pal16 = dd2_get16pal(skbdwin.dd2hdl, src[i]);
                         }                          }
                         break;                          break;
   #endif
   #if defined(SUPPORT_24BPP)
                   case 24:
   #endif
   #if defined(SUPPORT_32BPP)
                 case 32:                  case 32:
   #endif
   #if defined(SUPPORT_24BPP) || defined(SUPPORT_32BPP)
                         for (i=0; i<pals; i++) {                          for (i=0; i<pals; i++) {
                                 dst[i].pal32.d = src[i].d;                                  dst[i].pal32.d = src[i].d;
                         }                          }
                         break;                          break;
   #endif
         }          }
 }  }
   
 static void skpaintmsg(HWND hWnd) {  static void skdrawkeys(HWND hWnd, BOOL redraw) {
   
         HDC                     hdc;  
         PAINTSTRUCT     ps;  
         RECT            rect;          RECT            rect;
         RECT            draw;          RECT            draw;
         CMNVRAM         *vram;          CMNVRAM         *vram;
   
         TRACEOUT(("skpaintmsg"));  
         GetClientRect(hWnd, &rect);          GetClientRect(hWnd, &rect);
         draw.left = 0;          draw.left = 0;
         draw.top = 0;          draw.top = 0;
         draw.right = min(skbdwin.width, rect.right - rect.left);          draw.right = min(skbdwin.width, rect.right - rect.left);
         draw.bottom = min(skbdwin.height, rect.bottom - rect.top);          draw.bottom = min(skbdwin.height, rect.bottom - rect.top);
         hdc = BeginPaint(hWnd, &ps);  
         vram = dd2_bsurflock(skbdwin.dd2hdl);          vram = dd2_bsurflock(skbdwin.dd2hdl);
         if (vram) {          if (vram) {
                 softkbd_paint(vram, skpalcnv);                  softkbd_paint(vram, skpalcnv, redraw);
                 dd2_bsurfunlock(skbdwin.dd2hdl);                  dd2_bsurfunlock(skbdwin.dd2hdl);
                 dd2_blt(skbdwin.dd2hdl, NULL, &draw);                  dd2_blt(skbdwin.dd2hdl, NULL, &draw);
         }          }
   }
   
   static void skpaintmsg(HWND hWnd) {
   
           HDC                     hdc;
           PAINTSTRUCT     ps;
   
           hdc = BeginPaint(hWnd, &ps);
           skdrawkeys(hWnd, TRUE);
         EndPaint(hWnd, &ps);          EndPaint(hWnd, &ps);
 }  }
   
Line 650  HWND skbdwin_gethwnd(void) { Line 667  HWND skbdwin_gethwnd(void) {
         return(skbdwin.hwnd);          return(skbdwin.hwnd);
 }  }
   
   void skbdwin_process(void) {
   
           if ((skbdwin.hwnd) && (softkbd_process())) {
                   skdrawkeys(skbdwin.hwnd, FALSE);
           }
   }
   
 void skbdwin_readini(void) {  void skbdwin_readini(void) {
   
         char    path[MAX_PATH];          char    path[MAX_PATH];

Removed from v.1.3  
changed lines
  Added in v.1.6


RetroPC.NET-CVS <cvs@retropc.net>